LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-04-2011, 01:25 AM   #1
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Rep: Reputation: 30
Reverse DNS wont work


Hi guys i have a problem getting my reverse dns lookup to work but forward lookup is ok. I configure it on my centos box, this is standalone box, here is my configs:

server ip is 172.16.0.2

named.conf


options {
directory "/var/named/"
};

zone "fakedomain.net" IN {
type master;
file "forward";
allow-query { any; };
};

zone "0.0.172.in-addr.arpa IN {
type master;
file "reverse";
allow-query { any; };
};

reverse:

$TTL 84600
@ IN SOA server.fakedomain.net. root.fakedomain.net (
1
2h
3h
4h
5h )

IN NS server
2 IN PTR server


The error that i get from the logs is that

"network unreachable resolving 2.0.16.172.in-addr.arpa/PTR/IN :
 
Old 02-04-2011, 02:30 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

First of all you should find out why you get a "network unreachable ...". Maybe the name server is not running due to errors, or there is a firewall blocking connetctions etc.

Now regarding your configuration, there are some errors:
In named.conf:
You miss the closing double quotes " in the zone name.
Also since your network is 172.16.0.0, the zone name should be 0.16.172.in-addr.arpa

In the zone file:
You have to give the FQDNs of the PTR records (not just a hostname) and don't forget the trailing dot. The following should work:
Code:
$TTL 84600
@ IN SOA server.fakedomain.net. root.fakedomain.net (
 2            ;Always increase the serial
 2h
 3h
 4h
 5h )

   IN NS server.fakedomain.net.
2 IN PTR server.fakedomain.net.
Regards
 
Old 02-06-2011, 09:42 AM   #3
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
Hi Sorry for the typo, i have made corrections but still issue persist... this is a stand alone server and its not connected to any network. upon checking the logs the error is the same but this time its unable to reach the root servers, how come its checking the root servers?
 
Old 02-06-2011, 11:25 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

You should post again the edited named.conf and the zone files, so we can tell what's wrong. And please use the CODE tags for this.
Also make sure that there is an A record for server.fakedomain.net in the forward zone.

Regards
 
Old 02-08-2011, 02:30 AM   #5
prodev05
Member
 
Registered: Jul 2009
Location: Planet Earth
Distribution: Unix & Linux Variants
Posts: 304

Rep: Reputation: 20
Try to find everything is right, use the command dig
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] BIND dns wont work ilvista Linux - Newbie 7 12-11-2010 04:04 AM
the reverse lookup query failed in the connected devices and work in the DNS itself another 1 Linux - Newbie 1 04-09-2009 02:44 PM
DHCP autoupdate DNS failing to update reverse DNS ScottChapman Linux - Networking 0 12-20-2008 07:42 PM
Reverse DNS - for email to AOL to work Swakoo Linux - General 5 01-16-2007 10:40 AM
dns wont work dilberim82 Linux - Networking 11 12-27-2001 10:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration