Score:1

Ubuntu 22.04 resolv.conf/DNS problem, cannot access internet

bv flag

My Ubuntu 22.04 computer was working fine. Somehow it crashed, upon reboot, I could not access the internet. Network works fine, able to access other network devices. I traced the issue to what I think is DNS and did the following;

rm -f /etc/resolv.conf

vim /run/resolvconf/resolv.conf
--> add Google name server 8.8.8.8

ln -s /run/resolvconf/resolv.conf /etc/resolv.conf

Internet works but when I restart, my changes are deleted.

My computer used to use the DNS from my router without having to add the Google DNS. How do I make this a permanent fix? Everytime I make this change, it is overwritten on restart, I don't know what service is doing this.

chili555 avatar
cn flag
Please try the sequence here: https://askubuntu.com/questions/1097382/why-does-resolv-conf-have-bad-defaults-and-why-is-it-always-reordering-the-bad-n/1097457#1097457 Welcome to Ask Ubuntu.
Donald Locker avatar
cn flag
My 22.04 laptop started this y'day p.m. systemd-resolvd is running. resolv.conf (symlink to /run/systemd/resolve/stub-resolv.conf) has [phone kbd is really difficult!] nameserver 127.0.0.53<newline>options edns0 trust-ad<newline>search .<newline><EOF>
Donald Locker avatar
cn flag
[Cont.] /var/log/syslog has many "[timestsmp] systemd-resolvd ... Using degraded feature set TCP instead of UDP for DNS server ::1." alrernating with "... set UDP instead of TCP..."
Donald Locker avatar
cn flag
[cont.] "nslookup github.com 192.168.68.1" succeeds. "nslookup github.com" fails; "nslookup github.com 127.0.0.53" fails (192.168.68.1 is wifi IP addr)
Donald Locker avatar
cn flag
workaround so I can type on real machine: sudo mv /etc/resolv.conf /etc/resolv.conf; sudo vi /etc/resolv.conf <insert nameserver 192.168.68.1>:wq;
Score:0
bv flag

I had the same issue with ubuntu vm in VirutalBox. I have found NAT Networks section empty, under Tools - Network Manager. I have added one with all defaults at which stage it was getting a NAT dhcp ip address. This has resolved the issue.

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.