4 ms·
> You've never had something like NetworkManager undo your edits to /etc/resolv.conf within microseconds? I've never really used NetworkManager on my personal
by ayushnix 5y ago
> You've never had something like NetworkManager undo your edits to /etc/resolv.conf within microseconds?
I've never really used NetworkManager on my personal setup but if you're using it, you are willingly giving control of your network settings inside /etc to it, including the DNS, which is why /etc/resolv.conf gets changed automatically. You can choose not to use NetworkManager or systemd-resolvd (while still using systemd) and they won't mess around with /etc/resolv.conf.
For network management, I do use systemd-networkd and it hasn't overwritten or changed my files in /etc/systemd/network in the past 6 years of me using Linux, not that I recall at least.
- jart 5y agoMy will is to control my dns but unfortunately every software vendor wants to control it and leak it and intercept it too. Not much choice there. You should ask yourself what you're not seeing.
- ayushnix 5y agoIf it helps, I've installed AdGuard Home on a Raspberry Pi 4 and I've configured my router to make my devices use the RPi for DNS queries. This would ensure devices with DNS management services (Android) use the DNS I want. For devices that don't use DNS management services, I've changed /etc/resolv.conf manually to point it to my RPi and that file never gets modified automatically. It's upto you how you manage your settings in /etc. A software will never modify anything in /etc without your choice.
- jart 5y agoWell wouldn't you say it's sad how we have so little control of our operating systems that we need to resort to external devices for this kind of thing?
- ayushnix 5y agoNot really, I haven't used Windows in a long time so I won't comment on it but on Linux, it's your choice. I've chosen to use a Raspberry Pi for my DNS but it's certainly not necessary. Before I had the RPi, I was using dnscrypt-proxy on my system locally and it was responsible for handling DNS. You can choose a network management service to make changes for you in /etc or you can do it yourself. Hell, the simplest thing you can do is not use either NetworkManager or systemd-resolved and edit /etc/resolv.conf to point to your favourite DNS server. That file will never change automatically and you can use whatever DNS you want.