DNS Settings Messed up

My internet connection isn't working because the DNS settings were somehow altered. I initially thought that I deleted my ethernet driver by accident, but I was incorrect.

I have tried fixing the DNS setting manually in the GUI settings and nothing changed. I have also tried resetting the network manager in the terminal too and nothing changed.

Does anyone have any recommendations on what I should try next?

Try this out. It covers Plasma and GNOME. Not sure what desktop you are using. Things don't change that much so even though older it should still be good. The problem maybe your IPS DNS settings don't work and there are alternate DNS providers like Google. Check it out, maybe it will work or point you in the right direction.

IMHO, the first thing to do is to diagnose DNS service itself using nslookup command in terminal like that:

$ nslookup
> server
Default server: 8.8.8.8
Address: 8.8.8.8#53
Default server: 8.8.4.4
Address: 8.8.4.4#53
> server 9.9.9.9
Default server: 9.9.9.9
Address: 9.9.9.9#53
> google.com
Server:		9.9.9.9
Address:	9.9.9.9#53

Non-authoritative answer:
Name:	google.com
Address: 142.250.185.110
> 

Here you can verify which DNS servers are currently configured, temporary assign another DNS server and verify whether it works. If nslookup shows that DNS servers work fine then DNS is probably misconfigured.

1 Like

Did you verify it was DNS? You could have messed up the "Enable DNS over HTTPS" in Firefox.

When you click on "Connection Information" (after clicking on the network icon) what DNS is indicated?

Sorry for getting back so late. I am running the MATE environment and I tried the gui option and nothing worked after that.

Sorry for getting back so late. I ran the command just like you have here and got this result:

Screenshot at 2022-04-04 15-23-20

I am pretty sure it's the dns server settings because nothing internet related (including terminal commands) doesn't work.

This is a long shot, but is your time/date correct? I have seen that happen twice myself, both times because the clock was way off. Once on a desktop due to an expired battery, and once on a laptop due to a BIOS error. No server would connect because the time was so far off.

I think the date and time is correct. I see it displaying the correct date and time. Thanks for the suggestion. Anything that could be throwing it off is worth checking.

  1. Obviously, your dns resolution is served by systemd-resolved dns caching service. You can verify its health using systemctl status systemd-resolved command.
  2. Actual dns servers' addresses are listed in /run/systemd/resolve/resolv.conf file. You can try to verify whether these dns servers work using nslookup as described above.

Good luck!

The systemctl status systemd-resolved command returns a bunch of lines that say:
"Using degraded feature set (TCP) -also (UDP)- for DNS server ::1"

the nslookup command returns an IP address that doesn't look like any of the DNS server IP addresses that people have shown me.

Frankly, I do not like systemd-resolved and do not use it. I am afraid that I can not explain how to repair systemd-resolved at your system, but I can show how I configure dns resolution at my own system. Just in case you would like to give it a try.

  1. get root privileges
  2. disable systemd-resolved
  3. create brand-new configuration for legacy dns resolver

That is:

sudo su
systemctl systemd-resolved stop
systemctl systemd-resolved disable
rm /etc/resolv.conf
touch /etc/resolv.conf

Edit /etc/resolv.conf

nano /etc/resolv.conf

and put there two lines with your dns servers' addresses, e.g.

nameserver 8.8.8.8
nameserver 8.8.4.4

Cheers!

Once you get your DNS working, and if you don't want Google for DNS, take a look here and/or here.

systemctl systemd-resolved stop doesn't do anything

I think the problem is that the default server address keeps setting at 127.0.0.53 instead of an actual DNS server address.

I honestly cannot find where network manager is storing the dns server settings either