Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ubuntu 12.10

I'll explain the first problem. Sometimes when I load a webpage it never finishes loading and it says cannot reach server or something like that. When I ping that website, the terminal says it cannot resolve the hostname. So I then tried Google's DNS servers but had no luck there. It's weird because I've never had this problem in Windows 7. I used

    cat /etc/resolv.conf

and it came up with this:

    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)

Why would it use Does that mean it's trying to resolve addresses locally? When I ping the comcast search server I get a timeout error.

share|improve this question
The DNS lookup seems to work if I replace with which is Google's DNS server. But that gets overwritten each boot. – Kenneth Clark Mar 25 '13 at 18:49
please split half of this (probably the AMD video problem) into a separate question, so it can get its own answers. – ImaginaryRobots Mar 25 '13 at 19:45
Okay. I split the two up. Now if only I can get a solution :/ – Kenneth Clark Mar 25 '13 at 20:10
I had already set my DNS server to so I changed it to, and it started working, so Google does have some issues sometimes too. Thought it was worth mentioning. – Eduard Luca Apr 24 '14 at 21:54
up vote 24 down vote accepted

/etc/resolv.conf (which is actually a symbolic link to /run/resolvconf/resolv.conf) is written by the resolvconf utility based on information coming from various possible sources. is the loopback IP address on which the NetworkManager-controlled instance of dnsmasq listens. Dnsmasq runs locally and accepts DNS queries at and forwards these queries to an external nameserver whose address is furnished by NetworkManager. This scheme does not always work well and if you have any problem with it (as you do) then it is advisable to disable NetworkManager-controlled dnsmasq. To disable it, edit /etc/NetworkManager/NetworkManager.conf

sudo gedit /etc/NetworkManager/NetworkManager.conf

and comment out the line


so that it looks like the following.


Then restart network-manager.

sudo restart network-manager

After this you should have a nameserver line in resolv.conf with a non-loopback IP address. If this is not the case then try the following command.

sudo dpkg-reconfigure resolvconf

If you still don't have a nameserver line in resolv.conf with a non-loopback IP address or if you still have no DNS service, try rebooting.

If you still have no good DNS service then start investigating the nameserver at the external IP address ( in the example below). Does it correctly resolve domain names when approached using the host or dig utilities?


dig @

Do Google's nameservers work?


dig @

If you find that your external nameserver isn't working properly then you should configure your connection to use a well behaved nameserver such as Google's. To do this, right click on the network indicator and go to Edit Connections | | Edit... | IPv4 Settings. Assuming that the current Method is Automatic (DHCP), set Method to Automatic (DHCP) addresses only and fill in good nameserver addresses in the field entitled Additional DNS servers.

share|improve this answer
Why is dnsmasq involved? This issue bites me everytime I install Ubuntu. – Joseph Garvin Nov 13 '13 at 21:42
For me it was a problem with Google DNS which was temporary unavailable. Which was manually configured in my gateway config as a primary DNS. DNS availability was checked by executing ping To fix this issues I change my primary DNS IP to one of the OpenDNS IP – jmarceli Jul 1 '14 at 8:54

You might want to right-click on the network-manager applet, edit connections and add another dns. That should 'stick'

share|improve this answer
When I edit it within the network manager it doesn't do anything. This is really weird... – Kenneth Clark Mar 25 '13 at 19:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.