Created
April 9, 2012 09:32
-
-
Save roymax/2342505 to your computer and use it in GitHub Desktop.
vpn-router-ip-up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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