Skip to content

Instantly share code, notes, and snippets.

@decnorton
Created January 28, 2014 20:39
Show Gist options
  • Save decnorton/8675882 to your computer and use it in GitHub Desktop.
Save decnorton/8675882 to your computer and use it in GitHub Desktop.
VPN Routing
#!/bin/sh
sudo mv ip-up /etc/ppp/ip-up
sudo chmod a+x /etc/ppp/ip-up
sudo chown root /etc/ppp/ip-up
#!/bin/sh
# VPN server IP
VPN_IP = "217.37.8.253"
# Office subnet
# http://www.aelius.com/njh/subnet_sheet.html
VPN_SUBNET = "172.16.50.0/24"
if [ "${5:-}" = $VPN_IP ]
then
/sbin/route add $VPN_SUBNET $5
# Add others if necessary. Can be full IP addresses
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment