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

You may also like...

3 Responses

  1. Pete says:

    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.

  2. Navid says:

    Solution 4 worked for me on Ubuntu 17.10.
    Thank you

  3. Dean Boulding says:

    Upgraded to kubuntu 18.04 and everything was fine. Upgraded a bunch of packages a couple of weeks later using the gui package manager, and lost DNS. Completing steps 1 and 2 above fixed it.

Leave a Reply

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