Tell app to use specific network interface

ChristiaanW

macrumors newbie
Original poster
Oct 15, 2008
6
0
Hi,

I'm using 2 network interfaces. One wifi, which is fast, and one ethernet, which is my internal connection. I want to download and browse with the wifi one, and stream and sometimes browse through the ethernet one. How can I tell apps to use either wifi or ethernet?
 

Tex-Twil

macrumors 68020
May 28, 2008
2,480
11
Berlin
Hi,

I'm using 2 network interfaces. One wifi, which is fast, and one ethernet, which is my internal connection. I want to download and browse with the wifi one, and stream and sometimes browse through the ethernet one. How can I tell apps to use either wifi or ethernet?
Hi,
what do you mean by "stream" ?

Do both of the interfaces have internet access ? Are they on the same network ?

You will probably have to set up some "routes" in your network configuration. I posted in a thread about routing on another forum so you might have a look here

Tex
 

macrem

macrumors 65816
Mar 11, 2008
1,397
66
Let's say you have:
- Internet: DSL d/l speeds @ 1-50 Mbps
- Wifi: 802.11n @ 270 Mbps
- Ethernet: Gigabit @ 1000 Mbps

What is the benefit of dividing up Wifi & Ethernet going to be? The way I see it, no matter how you slice it the bottleneck is going to be the Internet connection unless you somehow have a crazy fast connection (then it will probably be the servers you're connecting to).
 

MisterMe

macrumors G4
Jul 17, 2002
10,648
29
USA
Hi,

I'm using 2 network interfaces. One wifi, which is fast, and one ethernet, which is my internal connection. I want to download and browse with the wifi one, and stream and sometimes browse through the ethernet one. How can I tell apps to use either wifi or ethernet?
Your OS has one IP address which comes from one network interface. If you run a virtual machine, then the virtual machine may have its own IP address.

However, the overhead incurred in running a second OS defeats the purpose. You may setup multiple Locations, each with its own network interface. You may then use Automator or AppleScript to launch each application. Each launch script would switch to your preferred location before launching the app.

Isn't beginning to sound a bit crazy? The fact is that there is no good reason that your Wi-Fi connection should have noticeably different speeds than your Ethernet connection. That is the problem that you should be trying to address.
 

Tex-Twil

macrumors 68020
May 28, 2008
2,480
11
Berlin
Your OS has one IP address which comes from one network interface. If you run a virtual machine, then the virtual machine may have its own IP address.
Euhhh why are you talking about virtual machines ?

An OS does not has an IP address ! It's the network interface which has an IP address. So if they are several configured ifaces, there are several IPs.

Isn't beginning to sound a bit crazy?
In my opinion it's not crazy at all. I do agree that the OP should explain why he wants such a setup but I totally see some use cases. You guys just suppose that both net ifaces are connected to the same router which might not be the case. eg:

wifi interface: connected via an iphone -> slow connection -> I use it only chatting

ethernet interface: connected to my corporate LAN -> fast internet provider: I use it only for "non private" communication.

Tex
 

KyleAwesome

macrumors member
Jun 1, 2009
31
0
I'm also interested in doing this.

My setup is as follows:

comcast > sonicwall pro 200 for work VPN > ethernet to mac mini
building provided wireless > mac mini

I would like to have firefox and transmission only have access to the wireless as to not have anything "questionable" go over the VPN accidentally.

Anyone have any ideas on how to make this happen?
 

KyleAwesome

macrumors member
Jun 1, 2009
31
0
thought:

IF I got into system pref's adjust the order of my network preference by "set service order" place my ethernet (VPN, work network) to the first spot this means it is the primary connection correct?

So if I place my airport connection second in the list and then go into advanced > DNS and add all of the questionable domains to the "search domains" list will those requests still go through the ethernet or will they be routed over the wireless?
 

Killerbob

macrumors 65816
Jan 25, 2008
1,050
99
My Mac Pro is connected to my LAN (via Ethernet), which has my internet connection into the switch. I also have an LTE modem which broadcasts a WiFi in the house, and I want to make specific applications use one network interface (EN1) and other applications use the other (WiFi). How do I do that?

The reason is that I live in Greenland where we unfortunately have very slow and very expensive internet. Hence I have a fast connection, which is expensive and metered (I want to use this interface for surfing etc.), and I have a slow connection, on which I have flatrate (I want to use this interface for Unison etc.).

I have looked all over and I can't seem to find a solution...
 

cerberusss

macrumors 6502a
Aug 25, 2013
916
355
The Netherlands
I think it's much, much easier to simply use another machine for Unison (that's a file syncing utility, right?).

For example, set up a Linux box that's connected to the slow and unmetered connection. Then also have it share its files over a samba share or something.
 

Killerbob

macrumors 65816
Jan 25, 2008
1,050
99
Not exactly, but perhaps if it was just for Unison I would. However, today it is Unison, then it a big update in iTunes - I would like a solution where I can decide which interface a specific application uses. It can't be that hard...
 

cerberusss

macrumors 6502a
Aug 25, 2013
916
355
The Netherlands
Not exactly, but perhaps if it was just for Unison I would. However, today it is Unison, then it a big update in iTunes - I would like a solution where I can decide which interface a specific application uses. It can't be that hard...
Well I know how to do this under Linux. It involves creating a group and then giving certain app binaries that group. Then when they run, you can set up a firewall rule to only let certain groups use a certain interface.

For instance I gave my bittorrent client a specific group that only had rights to use the VPN interface.

Probably something similar can be done with the macOS firewall.
 

buddyspencer

macrumors 6502
Oct 4, 2005
366
69
Germany
Hi,

I do have the same problem. Wanna use Microsoft Remote Desktop Client with another Network interface (Thunderboldt) instead of WIFI.
So that this specific App uses the LAN Connection.

Possible?
 

Killerbob

macrumors 65816
Jan 25, 2008
1,050
99
Is there no one out there that has figured out how to do this? I see from other posts I am not the only one who would like to do this...
 

Killerbob

macrumors 65816
Jan 25, 2008
1,050
99
I have this exact question in another post, and it seems no one knows how... There are plenty of use cases, and there has to be a way.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.