I've created a simple bind dns server to host 3 zones in a test lab.
- bath.local (192.168.100.0/24)
- munich.local (192.168.101.0/24)
- dhcp.local (192.168.99.0/24)
I want forward and reverse resolution, but I cannot validate the reverse config.
Am I missing some key concept here, or is this just a typo ?
Many thanks in advance!
I'm using the following as my /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
listen-on port 53 {
127.0.0.1;
192.168.99.2;
192.168.100.2;
192.168.101.2;
}; ### Master DNS IP ###
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";
allow-query {
localhost;
192.168.99.0/24;
192.168.100.0/24;
192.168.101.0/24;
}; ### IP Range ###
recursion yes;
dnssec-enable no;
dnssec-validation no;
// dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "dhcp.local" IN {
type master;
file "forward.dhcp.local";
allow-update { none; };
};
zone "bath.local" IN {
type master;
file "forward.bath.local";
allow-update { none; };
};
zone "munich.local" IN {
type master;
file "forward.munich.local";
allow-update { none; };
};
zone"99.168.192.in-addr.arpa" IN {
type master;
file "reverse.dhcp.local";
allow-update { none; };
};
zone"100.168.192.in-addr.arpa" IN {
type master;
file "reverse.bath.local";
allow-update { none; };
};
zone"101.168.192.in-addr.arpa" IN {
type master;
file "reverse.munich.local";
allow-update { none; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
This relies on 3 forward and 3 reverse files in /var/named/[forward.*|reverse.*]
/var/named
├── data
├── dynamic
├── forward.bath.local
├── forward.dhcp.local
├── forward.munich.local
├── named.ca
├── named.empty
├── named.localhost
├── named.loopback
├── reverse.bath.local
├── reverse.dhcp.local
├── reverse.munich.local
└── slaves
Picking just one (bath.local), the forward config is
[root@dhcp named]# cat forward.bath.local
$TTL 86400
@ IN SOA dns.bath.local root.bath.local. (
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
@ IN NS dns.bath.local.
@ IN A 192.168.100.2
dns IN A 192.168.100.2
router IN A 192.168.100.1
The reverse config is [root@dhcp named]# cat reverse.bath.local
$TTL 86400
@ IN SOA dns.bath.local. root.bath.local. (
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
100.168.192.in-addr.arpa. IN NS dns.bath.local.
2 IN PTR dns.bath.local.
When I validate the forward config all is ok
[root@dhcp named]# named-checkzone tsvtest /var/named/forward.bath.local
zone tsvtest/IN: loaded serial 2011071001
OK
But the reverse fails
[root@dhcp named]# named-checkzone tsvtest /var/named/reverse.bath.local
/var/named/reverse.bath.local:9: ignoring out-of-zone data (100.168.192.in-addr.arpa)
zone tsvtest/IN: has no NS records
zone tsvtest/IN: not loaded due to errors.
Any ideas ?