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.
bobwood2000Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.