DNS and BIND
Checking Configuration Files
The /usr/local/sbin
directory contains two useful tools: named-checkconf
and named-checkzone
. These tools are to check whether your configuration files are valid.
Checking /etc/named.conf
Run the named-checkconf
command to check whether your named.conf file is valid. If no results are returned, the configuration should be correct:
/usr/local/sbin/named-checkconf /etc/named.conf
Replace /etc/named.conf
with the location of your named.conf file.
Checking Zone Database Files
The following is an example of checking the db.testdomain.com zone database file using the named-checkzone command:
/usr/local/sbin/named-checkzone testdomain.com /etc/bind/db.testdomain.com
The first argument is the zone name as it appears in named.conf, in this case testdomain.com. The last argument is the location of the zone database file for testdomain.com, in this case /etc/bind/db.testdomain.com. The output of the named-checkzone command should be similar to the following:
zone testdomain.com/IN: loaded serial 2007031008 OK
The serial number, 2007031008
, will be different in each case.
Administration Guide - TOC | Previous Page - Configuring and Using the rndc tool | Next Page - Starting, Stopping, and Testing BIND |