How to fix DNS problems after upgrading Ubuntu 17.10 from ubuntu 17.04/16.10/16.04

Sponsored Link
One of my friend recently upgraded his ubuntu 17.04 to ubuntu 17.10 and after the upgrade my DNS stopped working.

Use one of the solutions to fix DNS issue on Ubuntu 17.10

Solution 1

Add the google DNS server in /etc/systemd/resolved.conf file

sudo nano /etc/systemd/resolved.conf

add the following line

DNS=8.8.8.8
FallbackDNS=8.8.4.4

Save and exit the file

Restart the systemd-resolved using the following command

sudo systemctl restart systemd-resolved

Solution 2

Edit the /etc/NetworkManager/NetworkManager.conf file

sudo nano /etc/NetworkManager/NetworkManager.conf

Change

dns=dnsmasq

to

dns=systemd-resolved

restart NetworkManager using the following command

sudo systemctl restart NetworkManager

Solution 3

Edit /etc/nsswitch.conf file

sudo nano /etc/nsswitch.conf

comment out the following line

hosts: files

Save and exit the file

Solution 4

add a line nameserver 8.8.8.8 in /etc/resolv.conf

Install unbound with sudo apt-get install unbound

disable the troublesome daemon with:

sudo systemctl disable systemd-resolved

sudo systemctl stop systemd-resolved

add dns=unbound in the [main] section of

/etc/NetworkManager/NetworkManager.conf

enable unbound with:

sudo systemctl enable unbound-resolvconf

sudo systemctl enable unbound

Reboot the ubuntu PC/server

If you can share which solution worked for you is very useful for other users and if you have any other new solution that would help more users.

Note:- Some of the solutions are from askubuntu

Sponsored Link

Related posts

2 thoughts on “How to fix DNS problems after upgrading Ubuntu 17.10 from ubuntu 17.04/16.10/16.04

  1. Sure
    $ sudo apt-get purge nm-*
    that fixes all sorts of issues. I’m thinking that purging netplan will also be something 18.04 requires to keep networking simple, working.

Leave a comment

Your email address will not be published. Required fields are marked *