Skip to content

Instantly share code, notes, and snippets.

@winguse
Created September 19, 2016 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save winguse/894d36d04cf2518913b1661f852ea5d0 to your computer and use it in GitHub Desktop.
Save winguse/894d36d04cf2518913b1661f852ea5d0 to your computer and use it in GitHub Desktop.
Mac VPN/routing

check current routing map

netstat -nr -f inet

find the route to target ip

route get HOSTNAME_OR_IP

modify the script when VPN is up

path: /etc/ppp/ip-up

sample

#!/bin/sh

/sbin/route add -net 52.53.219.0/24 -interface $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment