I have a personal VPN that I use as a default gateway for all Internet traffic when I'm on the road. This works great and I have no problem.

I also have a work VPN, which I need to connect to reach machines on their private network.

What I want to do is use these together. Unfortunately, redirect-gateway def1 on my personal VPN appears to redirect everything, including traffic that should go over the work interface.

For example:

utun3: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
    inet --> netmask 0xffffffff
utun4: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
    inet --> netmask 0xfffff800

above utun3 is the personal network interface that redirects everything and utun4 is the work network interface that i need to connect to certain machines.

I have tried setting routes to no avail. Work machines are on the network and I've tried to set routes such as:

route utun4 0

but the connection just hangs.  How can I make this work?


I think the correct syntax for the route add command would be:

route add -net netmask gw

I am guessing on the gateway (gw) number; you would need to ask your office's IT support about this if you can't figure it out by diagnostic tools.  (Or, if I understood the first part your question correctly, then you can use the def1 hostname.)

The reason you can't route it to the interface name directly, is because the network you are routing is not local on that interface.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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