Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have a VPN to my office and would like to route only office traffic over the VPN while maintaining my default route for other traffic.

I have attempted the following:

sudo route delete default
sudo route add default 192.168.1.254
sudo route add 172.0.0.0/8 172.26.7.79

Routing table after change:

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
default            192.168.1.254      UGScI           1        0     en1
default            192.168.1.254      UGScI           4        0     en0
127                127.0.0.1          UCS             0        0     lo0
127.0.0.1          127.0.0.1          UH              3      898     lo0
162.119.232.200    192.168.1.254      UGHS            3       78     en0
169.254            link#7             UCS             1        0     en0
172.0/8            172.26.7.79        UGSc            3        0   utun0
172.26.7.79        172.26.7.79        UH             34       95   utun0
192.168.1          link#7             UCS             9        0     en0
192.168.1          link#4             UCSI            3        0     en1
192.168.1.202      127.0.0.1          UHS             0       48     lo0
192.168.1.203      127.0.0.1          UHS             0        2     lo0
192.168.15         link#10            UC              3        0  vmnet8
192.168.99         link#9             UC              2        0  vmnet1

When this happens, I can get to 172.0.0.0/8 but I can't get anywhere else.

If I add a default route back such as:

sudo route default 172.26.7.79

Then everything starts working again.

Starting Routing Table:

Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
default            172.26.7.79        UGSc            2        0   utun0
default            192.168.1.254      UGScI           0        0     en1
default            192.168.1.254      UGScI           3        0     en0
127                127.0.0.1          UCS             0        0     lo0
127.0.0.1          127.0.0.1          UH              3      898     lo0
162.119.232.200    192.168.1.254      UGHS            3       94     en0
169.254            link#7             UCS             1        0     en0
192.168.1          link#7             UCS             9        0     en0
192.168.1          link#4             UCSI            5        0     en1
192.168.1.202      127.0.0.1          UHS             0       48     lo0
192.168.1.203      127.0.0.1          UHS             0        2     lo0
192.168.15         link#10            UC              3        0  vmnet8
192.168.15.132     0:c:29:14:38:20    UHLWIi          0      152  vmnet8   1136
192.168.99         link#9             UC              2        0  vmnet1

Any ideas?

share|improve this question
    
You might want to edit and specify what your VPN setup is. –  da4 Mar 6 '13 at 17:43
add comment

1 Answer 1

There is a checkbox in network preferences under your VPN entry labelled

"send all traffic over vpn connection" 

that you just need to uncheck, then restart your vpn connection.

share|improve this answer
    
This checkbox is not always available for Cisco IPSec networking. –  algal Jul 3 '12 at 11:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.