View Single Post
Posts: 46 | Thanked: 15 times | Joined on Feb 2007
#42
This is the script that I added to the /etc/ppp/ip-up.d/ directory.

Note: this will only work for the Indiana University VPN. It does work though, most of the time.

And for some strange reason, visiting 'http://www.metafilter.com' from the N800 over the VPN immediately starts generating VPN errors, and kicks me offline. I've not noticed it with any other website. However, I can get around that by using 'SSH -D' and proxying my web connections through another machine. The important thing, is that I now get packets.

Thank you so much.

#!/bin/sh
# pppd ip-up script for all-to-tunnel routing
# name of primary network interface (before tunnel)
GATEWAY=`route -n | grep "UG " | awk '{print $2}'`

# if we are being called as part of the tunnel shutdown
if [ "${GATEWAY}" == "192.168.1.1" ] ; then

echo "Connecting to VPN from non-IU network"

route add -host 156.56.245.6 gw $GATEWAY
route add -host 156.56.245.7 gw $GATEWAY

else

echo "Connecting to VPN from IU Wireless Network"

route add -host 156.56.245.16 gw $GATEWAY
route add -host 156.56.245.6 gw $GATEWAY
route add -host 156.56.245.7 gw $GATEWAY
route add -host 156.56.245.13 gw $GATEWAY

fi
sleep 5
route add default ppp0
echo "Finished Setting up Routes"