4 ms·
Most solutions for split DNS use daemons (including dns client in windows, macos resolver, systemd-resolved or dnsmasq), because they look at the name being res
by vetinari 6y ago
Most solutions for split DNS use daemons (including dns client in windows, macos resolver, systemd-resolved or dnsmasq), because they look at the name being resolved and then forward that query to the right DNS server via the right interface (the VPN DNS might depend on whether the interface is up, after all).
Similarly, reading /etc/resolv.conf and doing the resolving in-app will quickly lead to wrong results.
- dsr_ 6y agoThere are n different daemons that can clash over /etc/resolv.conf, or you could put the responsibility on the actual system resolver library routines by extending resolv.conf syntax a little. This would also solve the network namespace issue.
- vetinari 6y agoIt is simpler to persuade those few daemons that want to update resolv.conf to do something else (e.g. talk to networkmanager), than to ensure that every program that directly reads resolv.conf is updated for the new syntax. Programs are not supposed to read resolv.conf and implement their own resolver anyway (due to nss), but many still do.