Skip to content

Instantly share code, notes, and snippets.

@yohangdev
Last active August 29, 2015 14:09
Show Gist options
  • Save yohangdev/be0a8a12d67b60de26a5 to your computer and use it in GitHub Desktop.
Save yohangdev/be0a8a12d67b60de26a5 to your computer and use it in GitHub Desktop.
OSX Selectively route traffic through VPN /etc/ppp/ip-up
#!/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
#!/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