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 google.com
;; connection timed out; no servers could be reached

Please help me to diagnose this problem.

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

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

Edit it as root and add these two lines-

nameserver 8.8.8.8
nameserver 8.8.4.4

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).

link|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 8.8.8.8"... – Alexander Gladysh Oct 1 '10 at 18:14
1  
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
feedback

Your Answer

 
or
required, but never shown

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