I've run into a strange issue when changing my active DNS servers on Fedora. On other distros, I use a script which modifies my /etc/resolv.conf as and when I need it with resolvconf. On other Linux machines, the /etc/resolv.conf file contains just the new DNS servers when the script is ran:
nameserver 1.1.1.1
nameserver 1.0.0.1
Now my ISP's DNS is no longer used until I revert the file.
Now to Fedora, the /etc/resolv.conf file matches the above, and never seems to be overwritten, but my ISP's DNS is still being shown as a 3rd server when using dnsleaktest.com. After checking this website I check the contents of /etc/resolv.conf again and sure enough it's still the same, only 1.1.1.1 and 1.0.0.1.
I've read a lot of questions on this site and others about people saying that services such as systemd-resolved and networkmanager can update the resolv.conf which has resulted in DNS leaks, however the file never changes. My issue is that the resolv.conf file doesn't seem to be being obeyed.
So this begs the question, why is my ISP's DNS being used when I only have the 2 nameservers listed in my resolv.conf?
The only thing I'm doing different on Fedora is I'm not installing the openresolv package like I have done on other distros, as doing so seems to remove any 'resolvconf' binary from the system altogether.
Any help would be greatly appreciated.
chattr +i /etc/resolv.conf
assuming it's not a symlink (to/run/systemd/resolve/stub-resolv.conf
for example)./etc/nsswitch.conf
, maybe it has a funny value.