I have an Ubuntu VM that was installed with Ubuntu 16.04. It was functioning normally with network access and was able to resolve DNS.
I then upgraded it, via do-release-upgrade
to Ubuntu 18.04, Ubuntu 20.04 and then Ubuntu 22.04. Between each upgrade there was a reboot. I therefore must assume that DNS was working as of the 20.04 upgrade since it was able to download and process package updates.
Now, with 22.04, I am getting SERVFAIL
errors when attempting lookups via nslookup
.
$ nslookup google.com
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find google.com: SERVFAIL
The error refers to the DNS server 127.0.0.53 which I understand to be a loopback address. However, I cannot find where to change this.
Most sites say that I should be looking in the netplan.yaml configuration, but the netplan folder is empty:
/etc/netplan$ ls -la
total 16
drwxr-xr-x 2 root root 4096 Sep 7 2021 .
drwxr-xr-x 116 root root 12288 Nov 25 13:32 ..
I have tried to edit /etc/network/interfaces
and changing the dns-nameservers
line:
auto eth0
iface eth0 inet static
address 10.100.99.xxx
netmask 255.255.255.0
gateway 10.100.99.yyy
dns-nameservers 8.8.8.8
After this change, I've restarted the networking
service and rebooted - no change.
I know that I can edit the /etc/resolv.conf
- which currently reflects the 127.0.0.53 address, and I am able to get DNS services to work instantly. This change does not survive a reboot.
systemctl status network-manager
reveals network-manager.service could not be found
.
Where do I change my DNS settings?