Ubuntu has this fancy system where by
/etc/resolv.conf isn’t actually a proper resolver but refers to a local server called 127.0.0.53. In some circumstances this is a pain because it feels you don’t have control over basic functionality of a PC.
When you start googling what’ s going on, you end up with 100s answers.
To see what actual resolvers you’re using, do this:
# resolvectl Global Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported resolv.conf mode: foreign Link 2 (eth0) Current Scopes: DNS Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported Current DNS Server: 220.127.116.11 DNS Servers: 18.104.22.168 DNS Domain: vander.host
Wrenching back control
To restore your system to a sensible state where you actually have control, you have to follow all these crazy steps:
sudo apt install resolvconf sudo systemctl enable resolvconf.service sudo systemctl start resolvconf.service sudo nano /etc/resolvconf/resolv.conf/head
Add the following two name servers to the
nameserver 22.214.171.124 nameserver 126.96.36.199
Restart the service:
sudo systemctl restart resolvconf.service
To check your work:
cat /etc/resolv.conf | grep -v '#'
The above command does an invert match so it will display lines that do not have comments.
What a mess. Well done Ubuntu.