3 ms·
On macOS, there's a straightforward solution for the VPN use case that doesn't involve a "fall back": the VPN registers its DNS servers for specific domain name
by geofft 9y ago
On macOS, there's a straightforward solution for the VPN use case that doesn't involve a "fall back": the VPN registers its DNS servers for specific domain names, and so anything in example.com has its list of DNS servers (tunneled through the VPN) and everything else has the original list of DNS servers from your physical network connection. See resolver(5) https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man5/resolver.5.html https://developer.apple.com/legacy/library/documentation/Dar... for a description of doing this with files named like "/etc/resolver/example.com" (and having the same syntax as resolv.conf), but you can also do this with SystemConfiguration (googling "SupplementalMatchDomains" should be helpful).
It looks like systemd-resolved implements something similar: https://www.freedesktop.org/software/systemd/man/systemd.network.html#Domains= https://www.freedesktop.org/software/systemd/man/systemd.net...
The fact that there is an incredibly common use case that consists of an unreliable workaround for people who don't have a local resolver that does this correctly is hardly reason to avoid writing a local resolver that works correctly.
- kelnos 9y agoIf you have an incredibly simple internal network, that might work fine. It certainly would not work at my organization.