Women in Technology

Hear us Roar



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, 192.168.100.0/24 is the local network, and 192.168.1.0/24 is the remote network we are vpn'd to. This is self-healing; when the vpn is disconnected the routes will fix themselves.


#!/bin/sh
# delete the broken default route
sudo route delete default


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


# set the new default route
sudo route add default 192.168.100.254

Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • If only i could choose default routes
    2004-11-18 23:36:56  avidan [View]

    THANK YOU "ANONYMOUS"!
    Now, does anyone know a way to get this script to run automatically everytime i connect via pptp vpn?
    -avidan

Showing messages 1 through 1 of 1.