No way to manually configure interface on MacOS?

Hello!

As far as I can tell right now, on MacOS, there is no way to manually override aspects of the network config/interface in any kind of persistent way.

As an example: let’s say I was running a DNS resolver within my network that I wanted to use globally across my systems, just using ZeroTier for connectivity (as opposed to configuration). I understand that doesn’t really fit the use-case for ZT’s pushed DNS configs, since those are scoped to a given domain – ok, I think I get that, but that’s not the feature I’m talking about.

On iOS and Android, if I set a custom DNS server on the client when adding the network, that DNS server is then used for all lookups while the ZeroTier connection is up. On Linux, I can either use NetworkManager to set the DNS servers for the interface, or I could use ifup/down scripts to update resolv.conf or create iptables rules to route DNS queries.

But the MacOS client doesn’t present a MacOS “network service” that is configurable in System Settings nor networksetup on the cli. I haven’t found a good way to hook interface changes to run a script either that could make the required changes in some way – best option I’ve found is a launchd script watching resolv.conf but I don’t consider that a good way of watching for network changes, since not all changes will result in updates to resolv.conf – especially if you’re not using ZT’s DNS push. I’ve found StackOverflow posts recommending using crankd/pymacadmin to react to network changes, but that hasn’t been updated in more than a decade at this point, and I don’t really feel like this should require extra software to accomplish.

This issue isn’t really scoped to this DNS-specific use-case either – perhaps I want to change firewall rules on the fly or add some custom routes around (but not via) ZeroTier. None of this seems possible using the MacOS client.

Is there a reason not to present a configurable network service on MacOS? Is there a reason not to offer the option in the ZeroTier client on MacOS to add a local DNS override, similar to the feature available on iOS? Or is it possible I’m just missing something that would allow for this without having to add extra applications?

Thanks in advance!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.