1

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?

1
  • this is because you are fighting against resolvconf which is trying to apply some logic to which DNS servers you use for which connection
    – Amias
    Sep 18, 2016 at 12:05

4 Answers 4

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

1
  • Desktop is definately getting proper DNS entries from dhcp. I can check the connection info and see the proper DNS servers in the adapter details. So that is not the issue. If I copy those same DNS servers into the resolve.conf file, DNS resolution works. Already tried manually entering DNS servers into IPV4 setting a of the adapter. This has no effect. DNS resolution still doesn't work. Do these solutions are no help. Thanks. Brian. Jan 10, 2014 at 17:06
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.

2
  • This solution works temporarily, but seems like this issue can become a big headache once we stry VPN'ing into other networks and jumping on disimilar corparate networks with different internal DNS servers. Is there a propper fix to this issue? Seems like this is a bug, no? Jan 10, 2014 at 20:54
  • @user234215 If this happens with the VPN, then you need to check the VPN's configurations so they point to legitimate DNS servers, as the VPN's configurations will always be dominant over the settings on your systems. You can force DNS servers for your VPN connections too via Network Manager, but it's best to configure them via the VPN's configuration windows. If this is a bug, it would have already been filed, I bet this is "works as intended" and the issue is your configurations of the VPN and/or your system in Network Manager. (I am not a networking expert, though, keep that in mind)
    – Thomas Ward
    Jan 10, 2014 at 20:56
-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

0
-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 :)

1
  • 1
    While this technically answers the question, it would be preferable for you to include the key points of the link in your answer. (I have downvoted for this reason)
    – Thomas Ward
    Jan 10, 2014 at 18:29

Not the answer you're looking for? Browse other questions tagged .