Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

DNS trouble

Posted on 2004-10-24
7
Medium Priority
?
273 Views
Last Modified: 2010-03-18
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
Comment
Question by:bobwood2000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
7 Comments
 
LVL 38

Accepted Solution

by:
wesly_chen earned 1500 total points
ID: 12397185
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
 

Author Comment

by:bobwood2000
ID: 12397788
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
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12402109
Can you comment out "search" in /etc/resolv.conf?

Wesly
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 38

Expert Comment

by:wesly_chen
ID: 12402131
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
 

Author Comment

by:bobwood2000
ID: 12406133
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
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12406249
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
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12406260
One more check,
Are the namesever in /etc/resolv.conf the same as you got in the Windows (ipconfig /all)?

Wesly
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question