?
Solved

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

Posted on 2009-04-13
11
Medium Priority
?
1,598 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
Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

 

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 1500 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

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

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…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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…
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.
Suggested Courses
Course of the Month8 days, 4 hours left to enroll

765 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