About
I have a bad habit of proceeding with work without properly backing it up.
It seems that upgrading from Ubuntu 22 to 24 can cause issues with name resolution. However, I didn’t encounter any problems on my laptop. Because of this, I upgraded my desktop without hesitation, but this issue occurred.
In an attempt to fix the name resolution issue, I tried various commands, but none of them worked. Ultimately, I decided to revert back to version 22.
As you can see below link, there is some changing in DNS settings.
Symptom
Won’t have passed (TimeOut)
ping google.com
apt-get update/upgrade
Will have passed
dig google.com @8.8.8.8 +trace
ping 8.8.8.8
telnet 8.8.8.8 53
dig +tcp @8.8.8.8 google.com
What I did for fixing it
sudo ufw allow 53
sudo resolvectl flush-caches
resolvectl status
sudo nano /etc/resolv.conf
nameserver 8.8.8.8
nameserver 1.1.1.1
nmcli connection show
sudo nmcli connection modify "your_connection_name" ipv4.dns "8.8.8.8 8.8.4.4"
sudo nmcli connection modify "your_connection_name" ipv4.ignore-auto-dns yes
sudo nmcli connection down "your_connection_name"
sudo nmcli connection up "your_connection_name"
sudo nano /etc/systemd/resolved.conf
[Resolve]
DNS=8.8.8.8 8.8.4.4
FallbackDNS=1.1.1.1 9.9.9.9
DNSStubListener=no
sudo systemctl restart systemd-resolved
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
sudo systemctl restart NetworkManager
journalctl -u NetworkManager
What is changed in 24.04?
The location of sources.list for apt
/etc/apt/sources.list
to
/etc/apt/sources.list.d/ubuntu.sources
systemd-resolve
to
resolvectl
sudo ip route add default via 192.168.1.1
Result
Actually, these operations also affected the router, making it impossible to connect to the internet from other devices like an iPhone.
What a mess!
In the end, I gave up on upgrading Ubuntu on the desktop environment and reluctantly downgraded to version 22.
However, a few hours later, my laptop (ubuntu 24) was able to connect to the router and access the internet without any issues.
Despite the fact that just a few hours earlier the IPv4 gateway on the laptop showed no IP address, it now seems to be properly configured.
The settings remain a mystery—can’t something be done to make this process clearer?
I got so frustrated that I ended up generating an image of the Linux penguin crying.