A way to rout application to use network interface

Is there any way to rout an application to use a network interface?

For example I use ethernet and wireless both provide internet connections.
Ethernet network is very fast but it has very strict firewall as a result, torrents, email clients and other applications that need to connect through ports not working.
Wireless network is slower but its ok for sending and receiving messages mainly but its ok for small torrents too.
Ethernet network is first on priority list, second comes wifi so mainly even if I'm connected with both of them, I'm using only Ethernet.

My question is that is there a way rout applications to use a network interface? For example i would like to set Mail.app to use only wireless network and not ethernet. Same with others applications.

Thanks in advance 🙂

MacBook Pro 2.5, Mac OS X (10.5.6)

Posted on May 8, 2009 2:48 PM

Reply
7 replies

May 8, 2009 4:52 PM in response to panosru

I don't think you can route per application, but you should be able to route based on destination. Lets say that all your mail goes through mailserver.example.com. You should be able to setup a routing rule that routes traffic destined to mailserver.example.com through a specific interface.

I am not 100% positive how to set this up on the Mac, but this looks promising.
http://support.apple.com/kb/TA27291

May 8, 2009 7:35 PM in response to Noah Robbin

Noah Robbin wrote:
I am not 100% positive how to set this up on the Mac, but this looks promising.
http://support.apple.com/kb/TA27291


That article has nothing to do with routing and won't help the original poster.

If you were trying to route traffic to certain hosts through different interfaces, that's relatively easy to do.

But to route traffic from particular applications or using particular ports out particular interfaces is rather more difficult.

One paid product that can provide this functionality is IPNetRouterX.

It is also possible to do the same using natd but its configuration is non-trivial to say the least and may require building a custom Mac OS X kernel; it's definitely not for the faint of heart:

natd(8) man page

May 8, 2009 9:01 PM in response to Noah Robbin

As I mentioned, doing it by application isn't easy.

But doing it by site is easier, but note this means that all traffic to the site will be routed in the same way.

So for example, if your ISP uses the same IP addresses for mail servers and web servers, or uses multiple mail server IP addresses, it gets more difficult.

Are you experienced at all with using Terminal?

Even this gets a bit complicated…

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

A way to rout application to use network interface

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.