named-checkconf checks the syntax only of a named ( bind ) configuration file. The file is parsed and checked for syntax errors, along with all files included by it. If there are no file is specified with command, /etc/named.conf is read by default.
Tip 1: Check your dns ( bind ) configuration .
In case of any changes done in bind configuration, I recommend to check dns configuration file before restarting service.
# named-checkconf /etc/named.conf
If bind is running in chroot environment use below command also along with above command
# named-checkconf -t /var/named/chroot /etc/named.conf
Above command will show nothing if there are no error found in configuration file. In case of any error will displayed as output.
Tip 2: Check bind zone file using named-checkzone.
To check the syntax of zone file use command as below. It will show result in both cases.
# named-checkzone rmohan.net /var/named/rmohan.net.db
Sample output;
zone rmohan.net/IN: loaded serial 3013040200
OK
Tip 3: Check configuration file in older version of bind.
If you are using older version of bind, you can have also check the configuration using below command.
# service named configtest
Sample Outut:
zone tool.com/IN: loaded serial 42
zone localhost/IN: loaded serial 42
zone 1.168.192.in-addr.arpa/IN: loaded serial 1997022700
zone 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 1997022700
zone 255.in-addr.arpa/IN: loaded serial 42
zone 0.in-addr.arpa/IN: loaded serial 42
Recent Comments