Correct Way of Changing DNS?

Looks like you’re not using systemd-resolved, but NetworkManager.
In this case follow paragraph 4.7.3.1 of this page to avoid /etc/resolv.conf to be overwritten by NetworkManager

and then put the Quad9 dns ip in /etc/resolv.conf

nameserver ip1
nameserver ip2

Ok, one more ..

_rz=/etc/resolv.conf; ls -la $_rz; cat $_rz

I would like to see how resolv is doing in the current setup.
(This will list the file path and where it points if it is a link, then print its contents.)

It would appear they are not currently using systemd-resolved and they dont need it for setting the DNS .. I just wanted to know what the current setup was.

We will probably end up doing what @vazicebon suggests above or something similar.

So edit this /etc/NetworkManager/conf.d/dns.conf with the below

[main]
dns=none
systemd-resolved=false

And then remove /etc/resolv.conf and create a new one, with the same name, where I then add my NextDNS IPs? I assume that’s what you meant by the Quad9 IPs.

nameserver ip1
nameserver ip2

My bad, I thought NextDNS and wrote Quad9 :sweat_smile:.

I believe this works. My DNS is changed and I don’t see any DNS leaking when I test.

Thank you all for the help! I’ll revert if any issues arise. :slight_smile:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.