viernes, 7 de agosto de 2009

Backup and restore Putty configuration

1. Click Start->Run and type "regedit" in the "Open" dialog. Click "Ok"

2. Press "Ctrl+F" to bring up the Find dialog. Enter the name of the key, "SimonTatham" in the "Find What" field, and make sure only "Keys" is checked in the "Look At" section of the dialog. Finally, click "Find Next".

3. Click File->Export. Give your file an appropriate name like, "putty.reg" and click "Save".

4. We're done! Save the putty.reg file somewhere safe. The file doesn't contain any passwords or actual SSH key values so, it's relatively safe from prying eyes. Still, it does contain your configuration and that kind of data is a private matter.

5. To import your saved PuTTy configuration on any other Windows computer simply copy your exported registry key, right click on the file and click "Merge".

Windows will ask you for confirmation that you want to import this set of registry values. We know this file is safe, because we created it but, you should never import registry information from an unknown source.

lunes, 3 de agosto de 2009

OpenVPN && VPN OpenSolaris 11.06

Como Instalar OpenVPN en OpenSolaris x86 b79 32/64 bits
Este es el proceso empleado para instalar openvpn OpenSolaris 11.06

Primero debemos instalar las dependencias:

pkg install SUNWgcc


Descargar las fuentes de tun/tap.

cd /usr/local/src
wget http://www.whiteboard.ne.jp/~admin2/tuntap/source/tuntap/tuntap.tar.gz
tar xvfz tuntap.tar.gz
chown -R root:root tuntap
cd tuntap

Cambiar la configuracion del Makefile.in

LDFLAGS = -melf_x86_64
...
modules: tun.o tap.o
$(LD) $(LDFLAGS) -r -o tun tun.o
$(LD) $(LDFLAGS) -r -o tap tap.o


./configure
make

Configurar tun.
# devfsadm –i tun

Validar los mensajes del syslog.

#dmesg

Instalar LZO para compresion en Tiempo Real:

# wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.03.tar.gz

# gzcat lzo-2.03.tar.gz | tar xvf lzo-2.03.tar.gz

# gzcat lzo-2.03.tar.gz | tar xvf -

# cd lzo-2.03

# ./configure

# make

# make install



Instalar OpenVPN.

wget http://openvpn.net/release/openvpn-2.0.9.tar.gz
# gzcat openvpn-2.0.9.tar.gz | tar xvf –
# cd openvpn-2.0.9
##### ./configure --disable-lzo  # Para deshabilitar compresion de lzo
# ./configure --with-lzo-lib=/usr/local/lib

# make
# make install
Crear un archivo de start/stop para subir el servicio automaticamente:

#!/bin/bash
case "$1" in
'start')
echo "Starting Openvpn"
nohup /usr/local/sbin/openvpn --config /etc/openvpn/pegasus.conf --writepid /var/run/openvpnd.pid &
;;

'stop')
echo "Stoping Openvpn"
if [ -f /var/run/openvpnd.pid ]; then
PID=`cat /var/run/openvpnd.pid`
kill -9 $PID
ifconfig tun0 unplumb
fi
;;

*)
echo "Usage: $0 { stop | start }"
exit 1
;;
esac

Crear el archivo de configuracion similiar a:

client
dev tun
# tun-mtu 1500
tun-mtu 1434
proto udp
#remote 201.228.144.5 1194
remote 10.201.136.36 1194

ca /etc/openvpn/ca.crt
cert /etc/openvpn/pegasus.crt
key /etc/openvpn/pegasus.key
ping 30
ping-exit 66
verb 6
mute 20
comp-lzo

martes, 30 de junio de 2009

martes, 6 de enero de 2009

create iso image in solaris

dd if=/dev/dsk/c3t0d0s2 of=eisdvd.iso bs=512

jueves, 11 de diciembre de 2008

backup restore mysql sugar crm

backup:

mysqldump -u root -ppassw0rd sugarcrm > \
backup/sugarcrm_11-12-2008-01_dump.sql

mysqldump -u root -ppassw0rd sugarcrm > \ backup/sugarcrm_11-12-2008-02_dump.sql

mysqldump -u root -ppassw0rd --all-databases > \ backup/all-database_11-12-2008-01.sql

mysqldump -u root -ppassw0rd --all-databases > \ backup/all-database_11-12-2008-02.sql

Restore:

mysql -u root -peLaStIx.2oo7 sugarcrm < \ backup/sugarcrm_11-12-2008-02_dump.sql

lunes, 8 de diciembre de 2008

Remote Access to Mysql

grant select on *.* to 'root'@192.168.100.54 identified by 'eLaStIx.2oo7';
grant update on *.* to 'root'@192.168.100.54 identified by 'eLaStIx.2oo7';
grant create on *.* to 'root'@192.168.100.54 identified by 'eLaStIx.2oo7';
flush privileges;

viernes, 28 de noviembre de 2008

multi-boot solaris x86

#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
# Solaris 32bits
title Solaris 10 10/08 s10x_u6wos_07b X86 32b
findroot (rootfs0,3,a)
kernel /boot/multiboot kernel/unix
module /platform/i86pc/boot_archive
#---------------------END BOOTADM--------------------
title Solaris 10 10/08 s10x_u6wos_07b X86 64b
findroot (rootfs0,3,a)
kernel /platform/i86pc/multiboot
module /platform/i86pc/boot_archive
#---------------------END BOOTADM--------------------
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title Solaris failsafe
findroot (rootfs0,3,a)
kernel /boot/multiboot kernel/unix -s
module /boot/x86.miniroot-safe
#---------------------END BOOTADM--------------------

title Ubuntu 8.10, kernel 2.6.27-7-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-7-generic root=/dev/sda1 ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic