2

I have this persistent and annoying issue. When I first boot up, my desktop can't resolve any DNS names unless I edit the /etc/resolv.conf file and remove the entry for name-server 127.0.0.1 and change it to 8.8.8.8

This is only a temporary fix because this file is reset after each reboot.

I googled this for hours and tried multiple solutions but can't find a solution. I think there also might be a bug associated with this issue? Not sure though.

Can someone help?

Thomas Ward
  • 78,878

4 Answers4

0

Edit: This answer is assuming you are connected using DHCP, which most people are

You have two options;

First, properly setup the DHCP server that is giving your machine it's local IP address. If you use a router, go into the router's settings and make sure it is providing its clients (you), proper DNS servers.

If you are not using a router and get your DHCP directly from your ISP, call your ISP.

This is most likely the issue you have.

Second, solution if you can't do the first solution is to manually edit the connection rather than /etc/resolv.conf. Doing it this way should survive a reboot.

On the top panel, click on the network applet and go to Edit Connections. Choose the connection that you're having issues with and click Edit. On the IPv4 Settings tab, choose Automatic (DHCP) addresses only and fill in the DNS servers you want to use.

This will restart the connection, only pulling an IP address, while still using the DNS servers you just specified.

enter image description here

Sajan Parikh
  • 1,095
0

Try putting your nameserver entries into /etc/resolvconf/resolv.conf.d/base which is one of the files used by resolvconf to create the resolv.conf file.

While this technically will not permanently fix the issue, it is a workaround and SHOULD put those DNS servers into your resolv.conf file every time.

Heads up, though! Network Manager will usually overwrite these nameservers with the first three DNS nameservers you specify in the configuration for the connection(s) being used, so to make SURE this applies, edit the connection in network manager, then disconnect from the network, and reconnect. That will force Network Manager to accept the new DNS nameservers for that connection.


Even bigger heads up! VPN settings will usually override whatever settings you have configured. You will need to make sure the remote VPN servers are giving you legitimate nameserver addresses, or you will need to manually configure the nameservers via Network Manager or the VPN software you are using.

Therefore, if you are using a VPN and are running into this issue, then the remote VPN or your Network Manager VPN settings are wrong and need to be changed.

Thomas Ward
  • 78,878
-1

make your nameserver/dns server ip entry in /etc/resolvconf/resolv.conf.d/base file as follows

$ cat /etc/resolvconf/resolv.conf.d/base
nameserver 8.8.8.8

WORKING: resolvconf copy the contents of /etc/resolvconf/resolv.conf.d/base in dynamically generated /etc/resolv.conf

muru
  • 207,228
-2

This is maybe not a complete solution,it's just a temporary solution untill you can resolve it.

you can make a permanent change in resolv.conf

try this Link :)

Tommy Aria Pradana
  • 377
  • 1
  • 4
  • 17