Solved

NSLOOKUP and DNS queries not working with my CentOS 5 installation?

Posted on 2009-04-13
11
1,573 Views
Last Modified: 2013-12-15
Hi Folks

I'm stumped. I've just installed a new CentOS server and cannot get the DNS to resolve anything, no matter what I put in the resolve.conf file. It will ping OK if I enter an IP address but if I try to ping something that needs a resolve, NADA!

IPTables and SELinux is OFF. The main firewall that protects all our servers is set to ALLOW ALL from internal network to outside.

If I do an nslookup destination dns_serverIP it works fine but simply will not resolve a name to an IP.

Can anyone help? I need to get this server live ASAP and this is holding me up.

Cheers
Chris
0
Comment
Question by:kenwardc
  • 4
  • 3
  • 3
  • +1
11 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 24132722
Do you have an internal DNS server or are you relying on an external DNS server?

What entry/s did you try in /etc/resolv.conf?

In /etc/nsswitch.conf, do you have:

hosts:      files dns

0
 

Author Comment

by:kenwardc
ID: 24133274
Hi there, Tintin

Yes - I'm using external DNS servers - both ours and both working fine with all our other servers.
I've changed the entries in resolv.conf to other DNS servers with the same results.

nsswitch.conf has the:
hosts   files  dns
entry in it.

Cheers
Chris
0
 
LVL 48

Expert Comment

by:Tintin
ID: 24133296
What is the output of

host -v google.com
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:kenwardc
ID: 24133538
Hi Tintin

"Connection timed out. No servers could be reached"

I believe the servers are DNS servers and of course it all points to firewall issue but the firewall is set to allow ALL and the CentOS firewall is definitely off. <scratch>

Cheers
Chris
0
 
LVL 19

Expert Comment

by:jools
ID: 24133641
post your resolv.conf
0
 

Author Comment

by:kenwardc
ID: 24133658
Hi jools

I don't want to publicly post the details for our DNS servers. The resolv.conf file simply contains two lines. On each line there is a DNS server listed. That's it. The same resolv.conf file is in use on 4 other CentOS servers and all working fine.

Cheers
Chris
0
 
LVL 19

Expert Comment

by:jools
ID: 24133669
it is called resolv.conf and not resolve.conf as you posted earlier then?
0
 
LVL 19

Expert Comment

by:jools
ID: 24133682
also, the resolv.conf should read;

nameserver <ipaddress>
nameserver <ipaddress>

is that what you meant when you said `On each line there is a DNS server listed. That's it.`
0
 

Author Comment

by:kenwardc
ID: 24133722
Hi Jools
Yes - sorry - it's exactly that - resolv.conf and the entries are as you mention.

Cheers
Chris
0
 
LVL 48

Expert Comment

by:Tintin
ID: 24133762
When you say

"If I do an nslookup destination dns_serverIP it works fine"

Do you mean that when you are on the CentOS server, you do

nslookup 123.123.123.123 1.2.3.4

the IP address resolves correctly to the name, but not the other round?

Also, when you say:

"It will ping OK if I enter an IP address"

Is "it" one of the DNS servers?

0
 
LVL 40

Accepted Solution

by:
omarfarid earned 500 total points
ID: 24134598
A connection time out, means that you are not able to reach to the server or the server is down:

- Check again the firewalls (port 53 udp/tcp both ways) in the way to the dns server
- Check the routing and reachability to the server
- Check if the server ip is correct
- If you own the dns server, then check if the dns server process is not misbehaving
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

I wrote this article to explain some important DNS concepts that should be known to avoid some typical configuration errors I often see in forums. I assume that what is described here is the typical behavior of Microsoft DNS client. I don't know …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

773 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