Set to prefer ethernet for local transfers only?

Discussion in 'Mac OS X Server, Xserve, and Networking' started by Prodo123, Nov 24, 2016.

  1. Prodo123 macrumors 68020


    Nov 18, 2010
    Hello peeps,

    I have an external wireless network connected to the internet ( and an internal, isolated ethernet network for local file transfers only (, with separate DHCP servers. All machines connect to both networks except for the wireless network's DHCP.

    I want machines to access the internet via WiFi but LAN via ethernet. But when I set the service order to prefer ethernet over WiFi, it routes all traffic to the ethernet first, even external ones. As a result, the machines cannot access the internet in this configuration.

    When I set WiFi above ethernet, I can access the internet but since all machines are connected to both networks, local traffic is also routed through the wireless network when specified through multicast. For a variety of reasons, having to input the machines' IP addresses directly are not practical for my application.

    Does anyone know how one would make ethernet be preferred over WiFi for local transfers only?
  2. kiwipeso1 Suspended


    Sep 17, 2001
    Wellington, New Zealand

    Set the order of network connections to WiFi at the top, then ethernet. Would suggest that you simply use ethernet on an adapter, then unplug until you need LAN - at which point you turn off WiFi for the duration.
    The other way is to switch off wifi when you need LAN only. (no need for thunderbolt ethernet)
  3. Flint Ironstag macrumors 6502a

    Flint Ironstag

    Dec 1, 2013
    Houston, TX USA
    The OP tried this already. Prodo, there are 2 ways to go about this (off the top of my head).

    1. The free way - macOS shares a bunch of stuff with FreeBSD, including ipfw. You can configure this built-in firewall via terminal.

    2. Kerio makes Mac friendly firewalls.
  4. PilotWoo macrumors regular

    Jul 14, 2006
    Check the routing table on each machine. Set the default route to be your wifi network. To ensure any request for a 10.x.x.x address goes over Ethernet, make sure an address lookup via DNS is resolving to a 10.x.x.x address and not a 192.x.x.x address. If you don't have control over DNS, add static host entries.
  5. flashy-cat macrumors regular


    Apr 8, 2007
    Why are you doing this anyway? Seems a little odd.
  6. IHelpId10t5 macrumors 6502

    Nov 28, 2014
    I would try adding all of your 10.x addresses and associated hostnames to the /etc/hosts files of each computer. You need to use IP addresses, or hostnames that resolve to 10.x addresses to initiate communications locally. It sounds like your Macs are using Bonjour and discovering each other's hostname.local name and IP on the 192 network and are therefore trying that network first. If you short-circuit name resolution using a hosts file, or, using 10. IPs directly, then they should use that network because it's directly connected. To ensure that they don't use the 10. network for the Internet, configure them with static IPs for that network and don't configure a default gateway at all.

Share This Page