• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • Last Modified:

DNS trouble

My linux server cannot resolve domain names, though it has no trouble connecting to remote ip addresses. The router between it and the internet seems to providing the server with the addresses of valid DNS servers, and the server successfully stores these addresses in /etc/resolv.conf. I'm fairly sure the router is correctly configured, because another machine (this one a windows machine) I've connected to the router has no trouble resolving domain names. Any suggestions as to which of my servers settings need to be modifed?

Thanks.
0
bobwood2000
Asked:
bobwood2000
  • 5
  • 2
1 Solution
 
wesly_chenCommented:
Hi,

    What do you mean the remote IP addresses? Are those internet IP addresses or private addresses such your router?

   First, please try to ping the IP address of www.yahoo.com (66.94.230.38) to see if your Linux server can ping the ineternet.
If not, please check your default gateway setting by typing "netstat -rn". Make sure you can ping 66.94.230.38 first.

   Second, can your Linux server ping the IP address of DNS server which are in the /etc/resolv.conf? If you can ping the internet
IP addresses but can not ping DNS server, then either the DNS server down or the IP of DNS server is wrong. Since the Linux server
use DHCP to get address, you may need to check the DHCP server(on router?) to make sure you can ping the DNS server on the
DHCP server.

   If those steps cannot fix your problem, then please provide your content of /etc/resolv.conf and the output of "netstat -rn" as well as your
router's IP address. Those can help to trace the problem.

   One more thing, please check /etc/nsswitch.conf. Make sure there is "dns" in "hosts: files dns" so it will querry the dns.

Regards,

Wesly
0
 
bobwood2000Author Commented:
I should have said "external ip addresses" rather than "remote ip addresses". I have no trouble pinging or otherwise connecting to any ip addresses, internal or external. I also have no trouble pinging the dns servers in /etc/resolv.conf. The gateway router (192.168.1.1) appears to be correctly reported by netstat.

# cat /etc/resolv.conf
search
nameserver 199.166.28.10
nameserver 199.5.157.128
nameserver 199.166.29.3

# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0

Also, my /etc/resolv.conf file contains the line "hosts: files dns".
0
 
wesly_chenCommented:
Can you comment out "search" in /etc/resolv.conf?

Wesly
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
wesly_chenCommented:
Can you comment out "search" in /etc/resolv.conf?

By the way, I assume that it's the typo when you mentioned "hosts: files dns" in /etc/resolv.conf means "/etc/nsswitch.conf".

Wesly
0
 
bobwood2000Author Commented:
Okay, I removed "search" from /etc/resolv.conf. No difference made.

Indeed, I meant /etc/nsswitch.conf with respect to the line hosts: files dns.
0
 
wesly_chenCommented:
Ok, the next step is check the firewall setting on your Linux box if you have one.
iptables or ipchains are the softwares to limit the network access in/out your Linux box.
Please turn it off by the following commands:
service iptables stop
service ipchains stop
And then turn then off on the boot-up
chkconfig --level 2345 iptables off
chkconfig --level 2345 ipchains off

Wesly
0
 
wesly_chenCommented:
One more check,
Are the namesever in /etc/resolv.conf the same as you got in the Windows (ipconfig /all)?

Wesly
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now