Skip to content

Instantly share code, notes, and snippets.

@jcderr
Created March 13, 2015 21:06
Show Gist options
  • Save jcderr/3e77e0d40aa84491c919 to your computer and use it in GitHub Desktop.
Save jcderr/3e77e0d40aa84491c919 to your computer and use it in GitHub Desktop.
vpnroute.sh
#!/bin/bash
GATEWAY=$(ifconfig | grep 192.168 | grep "\-\->" | awk '{ print $2 }')
sudo /sbin/route add -net 10.0.0.0 -netmask 255.0.0.0 -gateway $GATEWAY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment