Score:1

Ubuntu22 DNS broken after power short

br flag

After a blackout, I had to fsck the partition to be able to login. After that, the clock was a few hours off, which caused the internet not to work. Eventually I got the time correct, but the internet still doesn't connect. It's a DNS problem, because I can't ping google.com but ping 8.8.8.8 works.

resolvectl status
Global
       Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: missing

Link 2 (eno1)
Current Scopes: none
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

Link 3 (wlx9cefd5fe6a19)
Current Scopes: DNS
     Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
   DNS Servers: 208.67.222.222 208.67.220.220 10.0.0.138
                2a06:c701:4e0b:b000:2b8:c2ff:febb:4c26 2a06:c701:ffff::1
                2a06:c701:ffff::2
    DNS Domain: local

Link 4 (lxcbr0)
Current Scopes: none
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

ls /etc/resolv.conf no such file

mpboden avatar
do flag
Can you update question with output of `resolvectl status` and `ls -l /etc/resolv.conf`?
Raffa avatar
jp flag
How do you connect to Internet … If your connection gets IP and DNS servers through DHCP from your router like most home connections, then it might be that your router also got messed up in the blackout and you need to fix it.
Yehuda Clinton avatar
br flag
I added the full resolvectl. I tried resetting the router also other devices work
Score:3
do flag

It looks like your /etc/resolv.conf file isn't setup properly. By default, this should be a symlink to /run/systemd/resolve/stub-resolv.conf, which is a file that defines the local caching stub resolver. Not sure why this isn't setup for you. Anyway, enter the following on the command line to create the symlink:

sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

Then run the following to restart systemd-resolved:

sudo systemctl restart systemd-resloved

After that, you should be good to go.

Yehuda Clinton avatar
br flag
Thx that worked. I will hand you the bounty. I was about to switch over to Debian
mpboden avatar
do flag
@YehudaClinton Glad it worked out.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.