Link to home
Start Free TrialLog in
Avatar of bobwood2000
bobwood2000

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of wesly_chen
wesly_chen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bobwood2000
bobwood2000

ASKER

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".
Can you comment out "search" in /etc/resolv.conf?

Wesly
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
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.
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
One more check,
Are the namesever in /etc/resolv.conf the same as you got in the Windows (ipconfig /all)?

Wesly