Tell app to use specific network interface

Discussion in 'macOS' started by ChristiaanW, Dec 2, 2009.

  1. ChristiaanW macrumors newbie

    Joined:
    Oct 15, 2008
    #1
    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?
     
  2. Tex-Twil macrumors 68020

    Tex-Twil

    Joined:
    May 28, 2008
    Location:
    Europe
    #2
    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
     
  3. macrem macrumors 65816

    macrem

    Joined:
    Mar 11, 2008
    #3
    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).
     
  4. MisterMe macrumors G4

    MisterMe

    Joined:
    Jul 17, 2002
    Location:
    USA
    #4
    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.
     
  5. Tex-Twil macrumors 68020

    Tex-Twil

    Joined:
    May 28, 2008
    Location:
    Europe
    #5
    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.

    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
     
  6. KyleAwesome macrumors member

    Joined:
    Jun 1, 2009
    #6
    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?
     
  7. KyleAwesome macrumors member

    Joined:
    Jun 1, 2009
    #7
    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?
     
  8. Killerbob macrumors 6502a

    Joined:
    Jan 25, 2008
    #8
    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...
     
  9. cerberusss macrumors 6502a

    cerberusss

    Joined:
    Aug 25, 2013
    Location:
    The Netherlands
    #9
    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.
     
  10. Killerbob macrumors 6502a

    Joined:
    Jan 25, 2008
    #10
    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...
     
  11. cerberusss macrumors 6502a

    cerberusss

    Joined:
    Aug 25, 2013
    Location:
    The Netherlands
    #11
    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.
     
  12. buddyspencer macrumors regular

    Joined:
    Oct 4, 2005
    Location:
    Germany
    #12
    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?
     
  13. Killerbob macrumors 6502a

    Joined:
    Jan 25, 2008
    #13
    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...
     
  14. Killerbob macrumors 6502a

    Joined:
    Jan 25, 2008
    #14
    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.
     

Share This Page