Okay so I got a problem, that my reverse lookup fail on my bind9 dns
#nslookup 172.16.0.179
Server: 127.0.1.1
Address: 127.0.1.1#53
** server can't find 179.0.16.172.in-addr.arpa: NXDOMAIN
Here is my reverse zone:
# nano /var/lib/bind/mosek.intranet.rev.zone
$ORIGIN .
$TTL 604800 ; 1 week
172.16.0.in-addr.arpa IN SOA braintree.mosek.intranet. admin.mosek.com. (
79 ; serial
604800 ; refresh (1 week)
86400 ; retry (1 day)
2419200 ; expire (4 weeks)
604800 ; minimum (1 week)
)
NS braintree.mosek.intranet.
$ORIGIN 0.16.172.172.16.0.in-addr.arpa.
$TTL 3600 ; 1 hour
179 PTR harbinger.mosek.intranet.
The PTR entry is something bind9 autogenerated
and here is my /etc/bind/named.conf.local
//
// Do any local configuration here
//
include "/etc/bind/rndc.key";
zone "mosek.intranet" {
type master;
file "/var/lib/bind/mosek.intranet.zone";
allow-update {key rndc-key; };
};
zone "172.16.0.in-addr.arpa"{
type master;
file "/var/lib/bind/mosek.intranet.rev.zone";
allow-update {key rndc-key; };
};
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
as I see it, everything looks fine. what could cause the problem?
EDIT
I got it working so here's the working config:
# cat /etc/bind/named.conf.local
//
// Do any local configuration here
//
include "/etc/bind/rndc.key";
zone "mosek.intranet" {
type master;
file "/var/lib/bind/mosek.intranet.zone";
allow-update {key rndc-key; };
};
zone "0.16.172.in-addr.arpa"{
type master;
file "/var/lib/bind/mosek.intranet.rev.zone";
allow-update {key rndc-key; };
};
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
.
# cat /var/lib/bind/mosek.intranet.rev.zone
$ORIGIN .
$TTL 604800 ; 1 week
0.16.172.in-addr.arpa IN SOA braintree.mosek.intranet. admin.mosek.com. (
79 ; serial
604800 ; refresh (1 week)
86400 ; retry (1 day)
2419200 ; expire (4 weeks)
604800 ; minimum (1 week)
)
NS braintree.mosek.intranet. $
$ORIGIN 0.16.172.in-addr.arpa.
$TTL 604800 ; 1 week
179 PTR harbinger.mosek.intranet.
Best Answer
When specifying PTR records using the
in-addr.arpa
domain, the least significant part of the network IP address should come before the remaining parts, i.e., the reverse of the usual way of specifying IP addresses in dot-decimal notation.From Wikipedia article on Reverse DNS lookups
In your case,
172.16.0.in-addr.arpa
should be re-written in all your BIND configuration files as0.16.172.in-addr.arpa
. E.g., here’s how the zone file should look: