PPTP Client Auto Reconnect Note 

# Create vpn Connection
pptpsetup –create vpnhk –server x.x.x.x –username vpn-user-name –password vpn-password –encrypt –start
pptpsetup –create vpnlw –server y.y.y.y –username vpn-user-name –password vpn-password –encrypt –start
pptpsetup –create vpnfw –server z.z.z.z –username vpn-user-name –password vpn-password –encrypt –start

# Manual Connect VPN
pon vpnhk updetach
pon vpnlw updetach
pon vpnfw updetach

# Manual Disconnect All VPN
poff -a

# Manual Route Add
route add -net 192.168.90.0 netmask 255.255.255.0 dev ppp0
route del -net 192.168.90.0 netmask 255.255.255.0

# Setup Boot up ppp Auto Connection
/etc/network/interface
auto vpnhk
iface vpnhk inet ppp
provider vpnhk

auto vpnlw
iface vpnlw inet ppp
provider vpnlw

auto vpnhk
iface vpnhk inet ppp
provider vpnlw

# added by pptpsetup
/etc/ppp/chap-secrets
joehome vpnhk “AABBccdd” 192.168.45.40
joehome vpnfw “AABBccdd” 192.168.45.60
joehome vpnlw “AABBccdd” 192.168.45.70

# Auto pptp Re-connection modify Sample
/etc/ppp/peers/vpnfw
# written by pptpsetup
pty “pptp 19.15.3.2 –nolaunchpppd”
lock
noauth
nobsdcomp
nodeflate
name joehome
remotename vpnfw
ipparam vpnfw
require-mppe-128
maxfail 0
persist

# Install quagga Dynamic Route tools
apt-get install quagga

# Dynamic Route Configuration, Need install quagga
/etc/quagga/daemons
zebra=yes
bgpd=no
ospfd=no
ospf6d=no
ripd=yes
ripngd=no
isisd=no
babeld=no

# Dynamic Route Table setting, Need install quagga
/etc/quagga/zebra.conf
hostname AnyName
password YourPassword
enable password YourPassword
ip route 192.168.1.0/24 192.168.40.1
ip route 192.168.40.0/24 192.168.40.1
ip route 192.168.60.0/24 192.168.60.1
ip route 192.168.70.0/24 192.168.70.1
ip route 192.168.90.0/24 192.168.40.1

# Dynamic Route Restart
/etc/init.d/quagga restart