Solved

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

Posted on 2009-04-13
11
1,594 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
[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
  • 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
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.

 

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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

Occasionally you run into the website or two that will not resolve properly using your own DNS servers.  Some people simply set up global forwarders for their DNS server.  I don’t recommend doing this because it can cause problems resolving addresse…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

688 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