DNS Error seen after hour of use

To get an idea of how NetworManager handles /etc/resolv.conf (and consequently relevant updates might have an impact on this) I think you could give a look at this Arch wiki article and relevant links:
https://wiki.archlinux.org/title/NetworkManager#/etc/resolv.conf
That’s why, if you want to use a specific DNS server, the procedure above and also the Garuda Assistant feature changing the DNS server use:

With that, in my opinion, you’re not going to have troubles with changing DNS servers in the future.

3 Likes

Whoever maintains the gateway NetworkManager is connecting to at that time chooses.

If it is your own gateway (home router, for example) you should log in to the admin portal and change the DNS settings there. That way any device that connects to your network will get the DNS servers you prefer.

If you do not have access to the gateway or cannot change it for some other reason, setting the immutable character as TBG mentioned will prevent it from being overwritten every time NetworkManager refreshes this process.

3 Likes

Also, just FYI, there are some routers that do not work well with cloudflare as the DNS server when using Linux. In those rare instances you would want to test Google’s DNS servers (or others), to see if your connectivity improves.

You could also try the method @TNE suggested:

2 Likes

I’m sorry, I don’t get the point in changing the file yourself when it is for all intents and purposes NetworkManager’s territory. If you don’t want NetworkManager to take control of the file, then don’t use NetworkManager, or tell NetworkManager to stop touching it via a config file as shown on the Arch wiki.

The dhcp server. If you change the config in NetworkManager to ignore the dhcp server’s info (called DHCP (Address only)) then it will use the address you configure in networkmanager.
And why without a warning? Because pacman is stupid. Pacman copies files from archives into directories, that’s all it does. It doesn’t do any checks to ensure it doesn’t delete user configs (unless we’re talking backup files that generate .pacnew files).

No, you’d only have to change it once, that’s the point.

1 Like

Like+subscribe :smile: