LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-12-2009, 07:39 AM   #1
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
bind reverse zone; no name with reverse lookup


Hi all,

I am using RHEL5.

These are my config files:

Code:
options {
        listen-on port 53 { 127.0.0.1; 192.168.14.54; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";

        // Those options should be used carefully because they disable port
        // randomization
        // query-source    port 53;
        // query-source-v6 port 53;

        allow-query     { localhost; 192.168.0.0/16; };
};

key "rndckey" {
        algorithm hmac-md5;
        secret "hc+CTxxanRbhILf3yjvLeA==";
};

controls {
        inet 127.0.0.1 port 953
        allow { 127.0.0.1; } keys { "rndckey"; };
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

view localhost_resolver {
        match-clients      { localhost; };
        match-destinations { localhost; };
        recursion yes;
        include "/etc/named.rfc1912.zones";

        zone "mydomain.com" IN {
                type master;
                file "mydomain.com.zone";
        };
        zone "14.168.192.in-addr.arpa" IN {
                type master;
                file "mydomain.com.rev.zone";
                allow-update { none; };
        };
};

view localnet_resolver {
        match-clients      { 192.168.0.0/16; };
        match-destinations { 192.168.0.0/16; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
        
        zone "mydomain.com" IN {
                type master;
                file "mydomain.com.zone";
        };

        zone "14.168.192.in-addr.arpa" IN {
                type master;
                file "mydomain.com.rev.zone";
                allow-update { none; };
        };
};
mydomain.com.zone is:
Code:
$TTL 4D
@       IN SOA mydomain.com. root.mydomain.com. (
                                        200910122
                                        16H
                                        4H
                                        2W
                                        4D
)

        IN NS names.mydomain.com.
        IN MX 10 names.mydomain.com.

names   IN A 192.168.14.54
ftp     IN CNAME names
www     IN CNAME names
And mydomain.com.rev.zone:
Code:
$TTL    86400
14.168.192.in-addr.arpa.       IN      SOA     mydomain.com. root.mydomain.com.  (
                                      2009101204 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
@        IN      NS      names.mydomain.com.
54      IN      PTR     names.mydomain.com.
55      IN      PTR     www.mydomain.com.
In /var/log/messages I see no errors.
Forward lookup does work,
however reverse lookup does not work.
Code:
[root@mydomain named]# dig @192.168.14.54 192.168.14.55

; <<>> DiG 9.3.4-P1 <<>> @192.168.14.54 192.168.14.55
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 48869
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;192.168.14.55.                 IN      A

;; AUTHORITY SECTION:
.                       10388   IN      SOA     A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2009101200 1800 900 604800 86400

;; Query time: 19 msec
;; SERVER: 192.168.14.54#53(192.168.14.54)
;; WHEN: Mon Oct 12 14:38:50 2009
;; MSG SIZE  rcvd: 106
I now have no clue what is wrong.

Anyone sees what I did wrong?
 
Old 10-12-2009, 08:10 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
As far as I can see you did not do any reverse lookup...
Use dig -x ip.add.re.ss to do a reverse lookup

I did not check on the config files cause DNS is of my mind for to long to remember most of the config options.
 
Old 10-12-2009, 08:21 AM   #3
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Original Poster
Rep: Reputation: 79
Quote:
Originally Posted by zhjim View Post
As far as I can see you did not do any reverse lookup...
Use dig -x ip.add.re.ss to do a reverse lookup

I did not check on the config files cause DNS is of my mind for to long to remember most of the config options.

Code:
[root@mydomain dovecot]# dig @192.168.14.54 -x 192.168.14.55

; <<>> DiG 9.3.4-P1 <<>> @192.168.14.54 -x 192.168.14.55
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45949
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;55.14.168.192.in-addr.arpa.    IN      PTR

;; ANSWER SECTION:
55.14.168.192.in-addr.arpa. 86400 IN    PTR     www.mydomain.com.

;; AUTHORITY SECTION:
14.168.192.in-addr.arpa. 86400  IN      NS      names.mydomain.com.

;; ADDITIONAL SECTION:
names.mydomain.com.     345600  IN      A       192.168.14.54

;; Query time: 1 msec
;; SERVER: 192.168.14.54#53(192.168.14.54)
;; WHEN: Mon Oct 12 15:23:16 2009
;; MSG SIZE  rcvd: 110
Seems that it was working all along :s

Great! Thanks for your help!

Last edited by deadeyes; 10-12-2009 at 08:23 AM.
 
Old 10-12-2009, 09:54 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Jup the -x option to dig helped it
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BIND forward zone OK, reverse zone NOT OK! n03x3c Linux - Server 2 11-05-2008 10:31 PM
Bind and reverse lookup, something ain't right. Sizam Linux - Networking 1 04-25-2005 06:51 PM
bind reverse lookup thesnaggle Linux - Software 1 03-11-2004 06:19 PM
Bind reverse lookup Kostko Linux - Networking 2 12-07-2002 09:06 AM
Cant get a reverse lookup in BIND to work phek Linux - Networking 2 10-23-2001 12:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:22 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