10 ms·
> /etc/resolve.conf It’s /etc/resolv.conf, and systemd overwrites it, Network Manager overwrites it (like every 10 minutes), dhcp overwrites it, etc. What do t
by manjalyc 6y ago
> /etc/resolve.conf
It’s /etc/resolv.conf, and systemd overwrites it, Network Manager overwrites it (like every 10 minutes), dhcp overwrites it, etc. What do they overwrite it to? Most just get it from the router even if the router has no assigned servers. These days manually managing /etc/resolv.conf by hand requires hooking into every service that overwrites it on most systemd distributions. So really the people this change would affect are those with misconfigured routers.
My issue is why they didn’t go with a more private DNS such as Open DNS or even Cloudfare DNS. Google’s privacy policy is worse than either of the two. It seems the questioner asked in bad faith but I would’ve hoped Poettering would respond to the validity and dismiss the malintent instead of dismissing the whole issue.
- rwmj 6y agoI do: chattr +i /etc/resolv.conf on my own servers to stop things from fiddling around with it.
- snus-kin 6y agoIt seems kinda brutal to just stop writing, but I guess there's a bit of a dogpile for writes on this file, does dhcpconf let you specify DNS servers kind of a 'layer up' from resolvconf?
- 411111111111111 6y agoI usually just add it to either netplan or cloudconfig, whichever is active. Both of them have yaml syntax though, which is imo extremely unfortunate for this kind of configuration.
- znpy 6y agoIt’s /etc/resolv.conf, and systemd overwrites it, Network Manager overwrites it (like every 10 minutes), dhcp overwrites it, etc. What do they overwrite it to? I still haven't understood where is the definitive place to set dns nowadays. /etc/resolv.conf is routinely touched by stuff like NetworkManager and other stuff. Systemd-resolved config seems like the correct place, but I'm not sure how that plays with network-manager.
- manjalyc 6y agoUniversal 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.
- creeble 6y agoThat's because distro releases just love to keep changing where network configuration goes. NetworkManager? No it's in sysconfig/interfaces. No that was last release. Now it's in a netplan YAML file you get to learn all about. So many terrific "improvements" every release!
- vetinari 6y ago
- WGH_ 6y agoAre you sure systemd overwrites it? I believe it maintains its own /run/systemd/resolve/{resolv,stub-resolv}.conf file, and it's up to you whether you want to symlink /etc/resolv.conf to one of these or not.