Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mykhailo-petrenko/2bcc41c8637d1aec4419b8ebeb6d6a8f to your computer and use it in GitHub Desktop.
Save mykhailo-petrenko/2bcc41c8637d1aec4419b8ebeb6d6a8f to your computer and use it in GitHub Desktop.
Routing tips for VPNs on OS X

Routing tips for VPNs on OS X

Clear DNS

sudo killall -HUP mDNSResponder

Add a specific route for the remote IP:

sudo route add -host 192.168.0.x -interface tun0

Useful commands to debug routing issues.

The following command will show the existing routing table (IPv4 only):

netstat -nr -f inet

The following command will show you how a specific host will get routed:

route get HOSTNAME_OR_IP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment