?
Solved

Problems with DNS reverse lookup

Posted on 2005-05-11
13
Medium Priority
?
288 Views
Last Modified: 2010-04-21
I'm trying to get my head around DNS on a Redhat Linux server.

Whilst it looks as though I've managed to get forward name resolution working successfully, I cannot seem to get reverse lookup working successfully.

Below appears the content of the file named.boot

[root@phantom named]# more /etc/named.boot
primary         akn846.com              db.akn846
primary         0.168.192.in-addr.arpa  db.192.168.0


Below appears the content of the file named.conf

[root@phantom named]# more /etc/named.conf
options {
        directory "/var/named";
};

controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {

        type hint;
        file "named.ca";
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};

zone "akn846.com" IN {
        type master;
        file "db.akn846";
        allow-update { none; };
};

zone "0.168.192.in-addr.arpa" IN {
        type master;
        file "db.192.168.0";
        allow-update { none; };
};
include "/etc/rndc.key";

Below appears the content of the file db.192.168.0
0.168.192.in-addr.arpa IN SOA phantom.akn846.com. andy@vs-spitfire.com. (
                                        1       ; Serial
                                        10800   ; Refresh after 3 hours
                                        3600    ; Retry after 1 hour
                                        604800  ; Expire after 1 week
                                        86400 ) ; minimum TTL of 1 day
; Name server definition
0.168.192.in-addr.arpa. IN      NS      phantom.akn846.com.
; Mapping IP addresses to DNS names
165.0.168.192.in-addr.arpa.     IN      PTR     phantom.akn846.com.


From my understanding, I would expect to be able to enter the command

nslookup 192.168.0.165

and get the name phantom.akn846.com returned, however when I attempt this command the response I get is:

** server can't find 165.0.168.192.in-addr.arpa: SERVFAIL

Could someone tell me where it is I'm going wrong.

Thanks

andy

0
Comment
Question by:akn846
  • 5
  • 5
11 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 13984868
can you repeat same problem with either dig command or host command ???
0
 

Author Comment

by:akn846
ID: 13985996
Same problem does occur with either of these other tools
0
 
LVL 62

Expert Comment

by:gheist
ID: 13990764
Your zone files are dead wrong, and named does not start, read log messages, they name file rows ( IMO almost all in zone files )
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:akn846
ID: 13993847
Sorry I don't understand your point about the zone files being 'dead wrong', and named not starting

named does start, and enables me to undertake forward name resolution - ie if I enter the node name nslookup/dig etc will return the IP address, what I would like to understand is that when I enter the IP address why I can't get the nodename returned.

I also don't understand the comment 'they name file rows' - please explain the response you've provided
0
 
LVL 62

Expert Comment

by:gheist
ID: 13995627
log lines name rows in reverse zones file which are wrong
I think it mentions all lines
0
 

Author Comment

by:akn846
ID: 13995858
Sorry, I still don't understand what it is that you are trying to say
0
 
LVL 62

Expert Comment

by:gheist
ID: 14001748
Your reverse zone is incorrect.
That is all
0
 

Author Comment

by:akn846
ID: 14003005
Sorry, I'm really finding the answers you're giving me extremely unclear - can you please tell me what I need to do in order to overcome the problem I've been having, I am new to DNS so explanations would be helpful as well

thanks
0
 
LVL 62

Expert Comment

by:gheist
ID: 14003790
0.168.192.in-addr.arpa IN SOA phantom.akn846.com. andy@vs-spitfire.com. (
                                        1       ; Serial
                                        10800   ; Refresh after 3 hours
                                        3600    ; Retry after 1 hour
                                        604800  ; Expire after 1 week
                                        86400 ) ; minimum TTL of 1 day
; Name server definition
0.168.192.in-addr.arpa. IN      NS      phantom.akn846.com.
; Mapping IP addresses to DNS names
165.0.168.192.in-addr.arpa.     IN      PTR     phantom.akn846.com

substitute with:

IN SOA phantom.akn846.com. andy@vs-spitfire.com. (
                                        1       ; Serial
                                        10800   ; Refresh after 3 hours
                                        3600    ; Retry after 1 hour
                                        604800  ; Expire after 1 week
                                        86400 ) ; minimum TTL of 1 day
; Name server definition
IN      NS      phantom.akn846.com.
; Mapping IP addresses to DNS names
165  IN      PTR     phantom.akn846.com
0
 
LVL 10

Accepted Solution

by:
neteducation earned 500 total points
ID: 14005292
Your SOA-Record has two errors in it:

Wrong Version:

0.168.192.in-addr.arpa IN SOA phantom.akn846.com. andy@vs-spitfire.com. (
                                        1       ; Serial
                                        10800   ; Refresh after 3 hours
                                        3600    ; Retry after 1 hour
                                        604800  ; Expire after 1 week
                                        86400 ) ; minimum TTL of 1 day

Correct Version:

0.168.192.in-addr.arpa. IN SOA phantom.akn846.com. andy.vs-spitfire.com. (
                                        1       ; Serial
                                        10800   ; Refresh after 3 hours
                                        3600    ; Retry after 1 hour
                                        604800  ; Expire after 1 week
                                        86400 ) ; minimum TTL of 1 day

1st and most important error was the missing dot at the end of the zonename. Like this your entry was taken as relativ to the current domain or in other words your SOA-Entry would be valid for the zone 0.168.192.in-addr.arpa.0.168.192.in-addr.arpa

2nd was the email address that is responsible for the zone. the @-character must be replaced by a dot (.) character. The @-character in zonefiles is reserved as a macro for the current domain, so the following would be correct too:

@ IN SOA phantom.akn846.com. andy.vs-spitfire.com. (
                                        1       ; Serial
                                        10800   ; Refresh after 3 hours
                                        3600    ; Retry after 1 hour
                                        604800  ; Expire after 1 week
                                        86400 ) ; minimum TTL of 1 day
0
 

Author Comment

by:akn846
ID: 14008894
neteducation - thanks very much for the information, thats provided me with a much clearer understanding as to what the problem has been.

Many thanks
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month13 days, 23 hours left to enroll

807 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