1

I have these 3 files to configure a zone :

/etc/named.conf

zone "exemple.tn" IN {
type master;
file "/var/named/db.exemple.tn";
allow-update {none;};
};

zone "85.168.192.in-addr.arpa" {
type master ;
file "/var/named/db.cba.tn" ;
allow-update {none;};
} ;

/etc/var/db.exemple.tn

$ORIGIN exemple.tn.
$TTL 84600
@ IN SOA ns.exemple.tn. root@exemple.tn. (
123312 ; serial
1h ;refresh
2h ;retry
1w ;expire
1h) ;min cache
@ IN NS ns.exemple.tn.
@ IN A 192.168.25.128
ns IN A 192.168.85.129

/var/named/db.cba.tn

$TTL 86400
@ IN SOA ns.exemple.tn. root.ns.exemple.tn. (
4
10800
3600
604800
86400 )
@ IN NS ns.exmple.tn.
129 IN PTR ns.exemple.tn.

and when i run the command :

# named-checkzone exemple.tn /var/named/db.cba.tn

i get this error : zone exemple.tn/IN: NS 'ns.exmple.tn' has no adress records (A or AAAA)

Thanks in advance.

1 Answers1

4

There are plenty of obvious problems.

  1. Your command named-checkzone exemple.tn /var/named/db.cba.tn validates the contents of a zone with name exemple.tn reading its data from the file /var/named/db.cba.tn.
    However, looking at your provided configuration and zone data, /var/named/db.cba.tn seems to have data for the reverse zone 85.168.192.in-addr.arpa (for 192.168.85.0/24), not the zone exemple.tn.
    To make this less confusing, you may want to consider naming that file db.85.168.192.in-addr.arpa or something along those lines to make it more obvious what it actually is.

  2. The NS record in this reverse zone points to ns.exmple.tn. which is similar enough to ns.exemple.tn. in one of your other zones that I have to wonder if that is a typo or intentional?

  3. The SOA RNAME in your exemple.tn zone is root@exemple.tn but that should probably be root.exemple.tn (if you actually accept mail sent to root@exemple.tn at all, otherwise probably something else entirely).
    Similarly, I have to wonder if the SOA RNAME in the reverse zone should simply have the same value?

  4. The actual error message is from a check based on an actual lookup of that name. Depending on the circumstances you may want to only validate local data (see the -i option)

Håkan Lindqvist
  • 33,741
  • 5
  • 65
  • 90