Jun 23rd, 2009
Checking the configuration of named.conf and zone files
Checking the configuration of named.conf and zone files
The bind package has utilities to check the syntax of named.conf and any zone files. We can make use of those binaries to check our modifications done to those files before reloading or restarting named service.
To check the sytax of zone file /var/named/serverbuddies.com.db
zone serverbuddies.com.db/IN: loaded serial 2006032401
OK
If everything is correct, it will show the serial number with which the zone file is loaded. Otherwise, it will give error message indicating the line number at which the error occured.
To check the syntax of named.conf file,
You may also load the configuration of all master zones listed in named.conf at the time of checking the syntax as,
The command will show a detailed output in case any error in named.conf file.
This way we can make sure that we are not editing the configuration file wrongly.