Skip to content

Instantly share code, notes, and snippets.

@roymax
Created April 9, 2012 09:32
Show Gist options
  • Save roymax/2342505 to your computer and use it in GitHub Desktop.
Save roymax/2342505 to your computer and use it in GitHub Desktop.
vpn-router-ip-up
#!/bin/sh
# VPN_GATEWAY is the remote address of the vpn tunnel
# when ppp executes this script it will pass several values to it
# $5 will hold the remote gateway
VPN_GATEWAY=192.168.20.239
if [ "${5:-}" = "${VPN_GATEWAY}" ]
then
/sbin/route add 192.168.30.0/24 $5
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment