Solved

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

Posted on 2009-04-13
11
1,569 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
 

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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Issue to mail 11 41
linux crontab output 3 41
DNS A record 4 23
a free alternative to cpanel? 1 39
There have been a lot of times when we have seen the need to enter a large number of DNS entries in a forward lookup zone. The standard procedure would be to launch the DNS Manager console, create the Zone and start adding new hosts using the New…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now