Last active
August 29, 2015 14:09
-
-
Save yohangdev/be0a8a12d67b60de26a5 to your computer and use it in GitHub Desktop.
OSX Selectively route traffic through VPN /etc/ppp/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/bash | |
IFNAME="${1}" | |
LOCALIP="${4}" | |
REMOTEIP="${5}" | |
if [[ "${REMOTEIP}" == "10.1.15.1" ]]; then | |
/sbin/route -n delete "10.0.0.0/8" "10.1.15.1" | |
fi | |
# chmod a+x /etc/ppp/ip-down |
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/bash | |
IFNAME="${1}" | |
LOCALIP="${4}" | |
REMOTEIP="${5}" | |
if [[ "${REMOTEIP}" == "10.1.15.1" ]]; then | |
/sbin/route -n add "10.0.0.0/8" "10.1.15.1" | |
fi | |
# chmod a+x /etc/ppp/ip-up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment