Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've setup a Centos 5.4 (x86_64) box in a VM recently; the trouble is I just can't get internet to work on it.

Pinging the resolved google.com ips, nameserver ips works fine but DNS lookup queries don't.

Here's some of the digging around that I did:

dig google.com
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5 <<>> google.com
;; global options:  printcmd
;; connection timed out; no servers could be reached

nslookup google.com
;; connection timed out; no servers could be reached

I didn't observe any UDP/TCP packets during dig and nslookup either

cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 208.67.220.220
nameserver 208.67.222.222

Also my /etc/nsswitch.conf is in order and contains the "hosts: files dns"

What could be wrong?

share|improve this question
    
I'll definitely update you you guys on this as soon as I get a chance. –  user36993 Mar 8 '10 at 3:04
    
I had openSUSE 11.1 installed in a VM as well, DNS worked fine in it. –  user36993 Mar 8 '10 at 18:41
    
UPDATE: I tried with FreeBSD8 as well and DNS query didn't work. This is beginning to look more and more like an issue with my UTStarcom WA3002G4 ADSL2+ Router and its NAT or the lack of it. My setup and the ip addresses: Router 192.168.1.1 Windows 192.168.1.2 Centos 5.4 192.168.1.3 FreeBSD8 192.168.1.4 The windows host works fine with no issues with DNS queries. –  user36993 Mar 8 '10 at 19:55
    
Would be glad to email you the packet dump file, if you're interested. –  user36993 Mar 8 '10 at 20:09

3 Answers 3

  1. Rule out iptables:

    service iptables stop

Do the nslookup. If it works then inspect your ruleset and retry. Don't forget to restart iptables.

  1. Try telnetting to port 53 of those ip addresses:

    telnet 208.67.220.220 53

You should see:

$   telnet 208.67.220.220 53
Trying 208.67.220.220...
Connected to 208.67.220.220.
Escape character is '^]'.
share|improve this answer
    
nslookup didn't work, but telnet did. –  user36993 Mar 8 '10 at 18:39

Can you ping the DNS servers that were specified in resolv.conf?

share|improve this answer
    
yes I can ping them –  user36993 Mar 8 '10 at 18:37

I had the exact same issue and this question pointed me to the spot to fix it.

After banging my head against a wall for three days it turned out that my modem was the issue. DHCP was set locally which was causing havoc for my firewall.

After turning off DHCP on the modem and restarting it my name server was working perfectly.

share|improve this answer

Your Answer

 
discard

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