Super User is a question and answer site for computer enthusiasts and power users. 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 Maverick 10.10 i386 (beta).

From my box I can ping any host outside my gateway or on local network (including my DNS server).

But I can't resolve any domain name:

$ nslookup
;; connection timed out; no servers could be reached

Please help me to diagnose this problem.

share|improve this question
up vote 3 down vote accepted

You don't have proper DNS servers listed in /etc/resolv.conf

Edit it as root and add these two lines-


This will add the Google Public DNS servers. Try resolving domains after that. If it doesn't work, run /etc/rc.d/network restart (or reboot your box).

share|improve this answer
It worked, thanks. Very strange: DNS worked properly this morning, I haven't changed system settings (just used some wi-fi and then connected back to my home network). Also my /etc/network/interfaces already have the line "dns-nameservers"... – Alexander Gladysh Oct 1 '10 at 18:14
I don't know about exact ubuntu design, but I know one thing- the Linux resolver library checks /etc/resolv.conf for preferred DNS servers, and you didn't have them in the file. DNS may've worked in the morning due to gateway or something else. – Nilesh Oct 2 '10 at 5:53
Funny thing. Entries in /etc/resolv.conf are cleared each time I connect to WiFi network and then switch back to the cable. – Alexander Gladysh Oct 8 '10 at 16:16

Yes, because Ubuntu uses its own Network Manager to configure interfaces and protocols. Try checking the content of /etc/NetworkManager/system-connections/. Here you will find the configuration files for your interfaces. After modification, do a sudo service network-manager restart

share|improve this answer

You must log in to answer this question.

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