Solved

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

Posted on 2009-04-13
11
1,578 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Resolve DNS query failed errors for Exchange
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

856 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