Services and tunnels
named-checkzone
Reads a zone file as BIND would and reports its serial, or the line at fault.
A zone with one error is not loaded at all, so check the file before every reload: named-checkzone ZONE FILE
prints loaded serial N and OK, or what is wrong and where. named-checkconf does the same for named.conf.
named-checkzone command usage
named-checkzone ZONE FILE named-checkconf [FILE]
Options
-
corp.lab - the zone's name: relative names in the file are completed with it
-
/var/bind/corp.lab.zone - the zone file to read
named-checkzone examples
-
named-checkzone corp.lab /var/bind/corp.lab.zone - Checks the zone file and prints its serial.
Pitfalls
- It checks the file alone: a serial that did not rise since the last load passes here and fails on reload.