Route traffic through specific NIC for ARD only?

Discussion in 'Mac OS X Server, Xserve, and Networking' started by lokiju, Mar 5, 2014.

  1. lokiju macrumors 6502

    Joined:
    Jun 10, 2008
    #1
    First off, I do realize that maybe this isn't the right place to post this question so please forgive me if that is the case...

    I have my rMBP connected at work to both a wired LAN connection via USB Ethernet that's on a limited access subnet I use for my lab environment (I work in IT but not for our IT dept or I'd of just opened the ports I need).

    I'm also connected to our main corp network via wifi and this connection has the ports open I need in order to connect via Apple Remote Desktop to my home server (just a Mini with Mavericks).

    The problem I'm having is ARD will never connect using the wifi connection if both connections are active and I always have to disconnect the USB Ethernet connection first if I want to successfully connect back to my home server via ARD.

    In apps like Synergy that I use to control my Windows 8 box thats on my desk also, I'm able to define the IP to use on my Mac so that it avoids this issue.

    I'm not seeing or aware of any way to do something like this for ARD and was wondering if anyone has any other methods to accomplish my end goals?

    Does OS X have some way to do a route command thats app or protocol specific? Is there any 3rd party solutions that anyone is aware of that'll get me to my goal?

    Many thanks in advance!
     
  2. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #2
    Go to System Preferences in the Network pane then click the little cog at the lower left at select Set service order. It sounds like you have the USB-ethernet connection at the top of that list so it takes priority when both it and the wifi connection are live. If you drag it down below wifi then apply the settings that should fix you up.

    But that will send all traffic over wifi.

    I don't think there is an easy way to route specific apps over a particular interface on desktop version OS X. Maybe someone else can pop in here and address that.
     
  3. Alrescha, Mar 5, 2014
    Last edited: Mar 7, 2014

    Alrescha macrumors 68020

    Joined:
    Jan 1, 2008
    #3
    Set service order will by default send all traffic over Wi-Fi except for the subnet the Ethernet is attached to. It may solve the problem.


    The other possibility is to add a manual route via Terminal to send traffic destined for the home IP address to the access point being used by the Wi-Fi interface. This is not for everyone:

    To get the gateway address used by Wi-Fi, use:
    Code:
    netstat -rn|grep en0|grep default
    this should give you a line like this:
    Code:
    default            192.168.1.1        UGSc           23        0     en0
    To add the route, use:
    Code:
    sudo route add -host your_home_IP_address gateway_address
    The change isn't permanent, it will go away if you reboot, etc.

    A.
     
  4. lokiju thread starter macrumors 6502

    Joined:
    Jun 10, 2008
    #4
    Such a simple solution but that did the trick!

    Feel silly not even realizing there was a way to set that but makes complete sense.

    Thank you!
     

Share This Page