Using multiple network services on OSX?
September 21, 2011 2:31 AM   Subscribe

Mac OSX Networking: Can I configure different applications to use different Network services to connect? How do I do that?

Specifically, if I am connected to both Ethernet and Airport, I can set Ethernet as the highest priority on my Network Preferences Panel. This means all apps use Ethernet.

Can I configure a browser to use the Airport Network and ignore the Ethernet network? How do I do that?
posted by vacapinta to Computers & Internet (6 answers total) 4 users marked this as a favorite
First thing that occurs to me is setting up the browser to use a SOCKS5 proxy running on some other machine that's accessible via the Airport but not the Ethernet.

How is your network laid out?
posted by flabdablet at 5:10 AM on September 21, 2011

I've run into the exact same problem before, but, I don't know the answer to this yet.

The obvious answer is to change your default route so that all traffic goes over your wifi, and add other routes for traffic to your private network segments so they go over the ethernet. This is somewhat impractical though.

Of course, the actual problem here is different from what is presented. vacapinta is actually running vpn software on the ethernet interface (cisco anyconnect), but, split tunneling is not enabled for it.
posted by yeoz at 5:11 AM on September 21, 2011

Best answer: If yeoz is right, and what you're actually trying to do is work around corporate VPN policy, you can do that by running a virtual machine inside your Mac and running the VPN endpoint software inside the VM instead of on the Mac itself. Then all you need to do is set up your Mac's routing tables so that corporate IP addresses get routed via the VM's virtual network adapter.

Be aware that if corporate IT finds out you're doing this, they're likely not to take it well. Corporate IT people have an entirely justifiable dislike of smartarses who circumvent policy in order to bring the entire world inside the corporate firewall.
posted by flabdablet at 5:54 AM on September 21, 2011

Best answer: Short answer is yes, you can. I do this on a pair of boxes, running Linux and Windows 7, at home, and the short answer is that, rather than re-configuring your applications, you need to follow yeoz's advice and change your Mac's routing rules.

Since Mac runs BSD I suspect if I just gave you instructions on how to set this up on Linux you could copy/paste it and have it working in no time, but I don't have the command handy right now sorry.

Here are some similar, previous questions:
posted by asymptotic at 7:27 AM on September 21, 2011

Response by poster: Thanks! I'll try these.
posted by vacapinta at 8:05 AM on September 21, 2011

I knew there was a way to do exactly this under Linux, Per-process routing, but it's a bit complicated involving iptables, packet marking/munging, multiple route tables and the like. There may be a similar way on OSX but somebody with a Mac would have to investigate and play around a bit.

If you can change the question to wanting to access a certain set of specific destinations through one interface and all other traffic through the other interface, then just mucking about with the routes will do it. Like in the Per-process routing article where you have a server, or your school's network that you want over the ethernet but you want everything else over wifi.

If you can make up example destinations, and provide the output of 'route -n', various *NIXy geeks here can probably craft commands to do the destination based routing.
posted by zengargoyle at 9:16 AM on September 21, 2011

« Older Calling Cards - from the Netherlands to the UK?   |   Help, please! VPN-enabled wireless router not... Newer »
This thread is closed to new comments.