Selectively routing connections through VPN on OSX

When connecting your OSX machine to your VPN and you only want to access the
resources on the private network and not tunnel your entire connection through,
in OSX, add the following:

  $ sudo route add -net <your private network - 10.0> -interface <your network
interface (usually ppp0)>

In your OSX configuration under the VPN, ensure that you uncheck “send all
traffic over VPN connection”


For Linux-based distros, the following will work:

$ sudo route add -net netmask ppp0