Weblog:   PPTP VPNs in Jaguar
Subject:   If only i could choose default routes
Date:   2003-03-31 23:26:45
From:   anonymous2
Response to: If only i could choose default routes

After setting up the VPN connection, try running the following script. You will of course need to change the IP addresses to fit your needs. In the example below, is the local network, and is the remote network we are vpn'd to. This is self-healing; when the vpn is disconnected the routes will fix themselves.

# delete the broken default route
sudo route delete default

# add the route to the vpn network
# via the pptp interface
sudo route add -net \
-netmask -interface ppp0

# set the new default route
sudo route add default

1 to 1 of 1
1 to 1 of 1