3 ms·
Universal practice is editing the resolv.conf file and then write-protecting it with. chattr +i /etc/resolv.conf This always works, but certain applications
by manjalyc 6y ago
Universal practice is editing the resolv.conf file and then write-protecting it with.
chattr +i /etc/resolv.conf
This always works, but certain applications NetworkManager have their own preferred way of doing things that I quite frankly do not care to learn.
- kevin_nisbet 6y agoI think it get's a bit harder than this, with newer systemd supporting name resolution over dbus. It's conceivable that some programs may move away from libc resolvers using resolv.conf and start querying the service directly over dbus. I'm not sure I'm personally a fan, just saying it's something that might become more common based on my read of the systemd docs awhile back.
- manjalyc 6y agoAh, I didn't want to get into the stupidity and sysadmin nightmare of systemd-resolved, but rest-assured even with systemd-resolved active most users can simply manage their /etc/resolv.conf file and systemd-resolved should respect it. It gets trickier when you don't have a network manager program or are use dhcp, VPNs, etc.
- vetinari 6y ago> with newer systemd supporting name resolution over dbus. Not only that, with suitably configured nsswitch.conf, (e.g. with nss-resolve), you might find out that your /etc/resolv.conf is used only by apps that have their own resolver and ignore the glibc one.