Was working fine then stopped inexplicably.

I can ping the gateway/DNS router/firewall (Untangle) using WiFi and cable using WiCd. Network Manager does not work on this computer

Firefox reports "server not found" & pinging google.com gives "unknown host".

WiCd setting show proper DNS IP, /etc/reslov.conf contains the correct IP (it was missing but I replaced it).

The DNS server/gateway ( works with other computers on the local network.

From laptop (…

user@laptop:~$ cat /etc/resolv.conf
# Generated by NetworkManager

user@laptop:~$ ping
PING ( 56(84) bytes of data.
64 bytes from icmp_req=1 ttl=64 time=0.854 ms
64 bytes from icmp_req=2 ttl=64 time=0.875 ms

user@laptop:~$ ping
PING ( 56(84) bytes of data.
64 bytes from icmp_req=1 ttl=64 time=0.774 ms
64 bytes from icmp_req=2 ttl=64 time=0.747 ms

From workstation (…

user@workstation:~$ ping
PING ( 56(84) bytes of data.
64 bytes from icmp_req=1 ttl=64 time=0.754 ms
64 bytes from icmp_req=2 ttl=64 time=0.720 ms

user@workstation:~$ ping google.com
PING google.com ( 56(84) bytes of data.
64 bytes from nuq04s08-in-f14.1e100.net ( icmp_req=1 ttl=46 time=90.6 ms
64 bytes from nuq04s08-in-f14.1e100.net ( icmp_req=2 ttl=46 time=92.2 ms

From laptop…

user@laptop:~$ ping
PING ( 56(84) bytes of data.
64 bytes from icmp_req=1 ttl=46 time=105 ms
64 bytes from icmp_req=2 ttl=46 time=91.5 ms
64 bytes from icmp_req=3 ttl=46 time=92.2 ms
64 bytes from icmp_req=4 ttl=46 time=89.3 ms

And also from laptop (using sudo)…

root@laptop:~# ps -e | grep bind
root@laptop:~# ps -e | grep net
   17 ?        00:00:00 netns

Additional information…

The laptop is dual boot, and with the same hardware Windows has no DNS problems. Also, there are three connection methods to the internet, two WiFi APs and a wired connection. This problem occurs on all three.

Skype seems to work, having no problems connecting to its network.

This Lenovo S12 (Intel atom) laptop does not seem to play nice with Linux/Ubuntu as several custom work-arounds are required to get Ubuntu working ⋯ e.g. needing WiCd because Network Manager does not work. More here, here, here, and here.

  • Can you ping machines by IP address still? If not, then it might not be a DNS issue. If you can ping by IP address, could you update your question to include the contents of /etc/resolv.conf? Apr 19 '12 at 3:55
  • Are you using any external DNS servers? Is your router configured to cache DNS requests? What DNS servers are you currently using?
    – Thomas Ward
    Apr 23 '12 at 18:40

I'm having the same issue. I've found that if I disconnect and reconnect to my wifi network, or if I reboot the machine, I can get one or two webpages to load, but then DNS stops working again. For the record, just because you can ping by IP, that doesn't mean that DNS is working. DNS is the service that turns names into IP addresses. Something odd that I did notice though, if I tether my laptop to my phone, internet works perfectly without a hitch. However, my home wifi network doesn't work for more than one webpage with Ubuntu even though it works with every other computer and device in the house.

  • I'd suggest checking if your router is acting as a DNS relay and, if it is, changing its configuration as suggested in the 2'nd part of my answer to have the systems on your LAN submit their DNS requests directly to your preferred DNS server. Apr 23 '12 at 18:29

Unfortunately this is another "not an answer". It is just a problem isolation suggestion.

You've already confirmed via ping that IP networking appears to be working correctly on your laptop. The next thing I would try is using someone else's DNS servers. I do not know why the default DNS servers provided by an ISP sometimes tend to flake out, just that they appear to do so.

The most common "other" DNS servers to try are Google's public DNS and/or OpenDNS. Since both are free, why not try both? :-) Below are the IP addresses you can use and a suggested terminal command to test them with. (dig (domain information groper) was suggested in this answer).

Google Public DNS (Domain Name System)


irrational@VBubu04-21daily:~$ dig  www.askubuntu.com @

; <<>> DiG 9.8.1-P1 <<>> www.askubuntu.com @
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56386
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;www.askubuntu.com.     IN  A

www.askubuntu.com.  1601    IN  A

;; Query time: 43 msec
;; WHEN: Mon Apr 23 13:26:18 2012
;; MSG SIZE  rcvd: 51

Eliminating Router "DNS Relay"

Another "For What It's Worth" digression suggestion. The default nameserver in your system turns out to be your router, i.e. /etc/resolv.conf == nameserver In other words, your router is playing the role of a DNS server.

Your systems send their DNS requests to your router and it forwards them on to whatever DNS the router is set up to use. The router should then forward any response returned from the DNS server to the system on your LAN which originally sent the DNS request.

I suppose whether or not this is a good thing depends on how you look at it. Being cynical, I tend to view this as adding yet another, unneeded middleman who could cluck things up to the processing. So I don't do this. Instead I configure my router to provide the IP addresses for the Google and/or OpenDNS DNS servers to any system on my LAN as part of its DHCP response.

The method to do this probably varies depending on the router's manufacturer. I have a D-Link 655 and the steps I have to follow are:

  • Log on to my router as admin.
  • Disable the DNS Relay checkbox in the Network Settings > Router Settings section of my router's setup.
  • Add the DNS IP addresses to supply via DHCP to the WAN (Internet) > DHCP section of my router's setup.

Rebooting your router is probably the quickest way to see if your router might part of the problem you're having. If it is ... or even if it isn't :-) ... you might consider the change suggested above.

  • Great idea about name-servers, which I did as part of the investigation. I use Google, OpenDNS is sometimes quirky. Response time improved on the other computers. My router is actually a Untangle firewall, and does not appreciably affect response, but does reduce internet traffic. Apr 24 '12 at 14:33
  • Yes, but when you dig a Google DNS server from the laptop does it work or not? Apr 24 '12 at 14:59
  • Found the problem before I tried... but no DNS is possible if there is no nameserver specified. Using WiCd does not modify /etc/resolv.conf, it must be done manually. User-ugly. Apr 26 '12 at 0:07
  • FWIW, yes, no DNS is possible with designating a nameserver. But the point of commands such as dig (or nslookup) is that you can specify the nameserver as a parameter. So dig should have worked even without /etc/resolv.conf. Apr 26 '12 at 0:23
  • Voila… So I used dig to test local untangle DNS vice direct google ( & OpenDNS ( and response was 105ms (local) vs 94 ms google vs 24 ms OpenDNS. Repeats for local were 0 ms. Drudge-reports annoying redraws are now much faster. Apr 27 '12 at 15:00

Resolution discovered.

/etc/resolv.conf is being deleted. How or why is undetermined.

It may be due to the fact that changing DNS in WiCd does not result in resolv.conf being changed.

Thanks to all for the suggestions.

  • I haven't checked but I assume /etc/resolv.conf is owned by root, no? That would mean it is not some casual application process which is deleting it, no? Apr 24 '12 at 18:05
  • Since it worked for months on a barely used laptop, the prime suspect is something involved in a distribution upgrade. WiCd is reportedly no longer maintained, and the Network Manager bug for the laptop is dormant. I'll pay more attention to why if it happens again. Apr 26 '12 at 0:02
  • A "for whatever its worth" comment. No idea if it is related to your problem or not, but apparently there have been official changes made to how Ubuntu does DNS. The person who posted this question later found and included in his question background this blog entry: DNS in Ubuntu 12.04 May 3 '12 at 3:46
  • @irrational John Thanks for the nod. 12.04 has switched to dnsmasq with network manager for resolving. See askubuntu.com/questions/127228/… (reportedly this use of dnsmasq is not caching) Since network manager does not work on my laptop, this may be a problem. May 4 '12 at 14:40
  • I made the leap and upgraded the laptop to 12.04. It kept Wicd but I dropped it and installed Network Manager. Except for on tiny hiccough, it worked and even preserved my Wicd WiFi settings. The tiny hiccough was system tray icon… did not work properly until I rebooted then opened >System Settings >Hardware/Network ⋯verified the settings were correct and closed it. I must say 12.04 with Gnome classic is pretty great! May 6 '12 at 20:15

Same problem, router and local DNS addresses were OK but I could only access websites directly through IP addressing.

Somehow /etc/resolv.conf was patched and the first (of 3) nameservers had an IPv6 address while my internet-provider does not offer IPv6 yet. After deleting the IPv6 address the issue was solved.


I had something similar happen on a Mint laptop. I came to this and similar questions through a search on "DNS stopped working". My wired connection was perfectly fine and the wifi connection sorta worked except for DNS. And even DNS worked sometimes.

I tried a lot of suggestions with no luck. I finally solved it when I came across the suggestion to run this command:

sudo dpkg-reconfigure resolvconf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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