Skip to content

Instantly share code, notes, and snippets.

@coldfire-x
Created November 2, 2012 07:37
Show Gist options
  • Save coldfire-x/3999300 to your computer and use it in GitHub Desktop.
Save coldfire-x/3999300 to your computer and use it in GitHub Desktop.
i'm using vpn intensely, but when i'm in office, i still need the connection to my local network, so here is the solution
#!/bin/sh
# put this in /etc/ppp/ppp0
# mac user only
gw=`netstat -nr|grep UGScI|awk '{print $2}'`
# replace 192.168 with your local network
/sbin/route add -net 192.168 -gateway $gw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment