How to fix broken DNS after fresh install Ubuntu 17.04

DNS sometimes does not work after fresh UbuntuĀ  17.04 install. To fix it open NetworkManager.conf file with default editor (nano):

sudo nano /etc/NetworkManager/NetworkManager.conf

This is the content:

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

Insert the following underĀ  [main] section before [ifupdown] section

dns=dnsmasq

The result should be like this:

[main]
plugins=ifupdown,keyfile
dns=dnsmasq

[ifupdown]
managed=false

Save it (CTRL+O) and exit (CTRL+X).

Now reboot to activate changes (you may restart NetworkManager instead of reboot).

  • Done!

Leave a Reply