Table of Contents

Ubuntu - Networking - DNS - Troubleshooting - DNS Resolver Not Working

Restart the Resolver Service

sudo systemctl restart resolvconf.service

Check Status

systemd-resolve --status

Check logs

sudo journalctl -u systemd-resolved

ls -al /etc/resolv.conf

returns:

lrwxrwxrwx 1 root root 32 Jan 10 18:50 /etc/resolv.conf -> /run/systemd/resolve/resolv.conf

ALERT: If for any reason it does not link to /run/systemd/resolve/resolv.conf then run :

sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

Alternatively, try:

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

try

sudo dpkg-reconfigure resolvconf

Only if above does not work, try:

Edit /etc/systemd/resolved.conf and add entry:

/etc/systemd/resolved.conf
[Resolve] 
DNS=192.168.1.1

References

https://wiki.archlinux.org/index.php/Systemd-resolved

https://www.freedesktop.org/software/systemd/man/resolved.conf.html

https://man.archlinux.org/man/systemd-resolved.8#/ETC/RESOLV.CONF