Command named-checkconf checks the syntax only of a DNS (bind) configuration file. The file is parsed and checked for syntax errors, along with all files included by it. If there is no file specified with the command, /etc/named.conf is read by default.
1. Check bind9 (DNS) Configuration
In case of any changes done in the bind configuration, I recommend checking the DNS configuration file before restarting the service.
named-checkconf /etc/named.conf
If the bind is running in chroot environment use the below command also along with the above command
named-checkconf -t /var/named/chroot /etc/named.conf
The above command will show nothing if there is no error found in the configuration file. In case of any error will be displayed as output.
2. Check Bind Zone File
To check the syntax of the zone file using the command below. It will show the result in both cases.
named-checkzone demotecadmin.net /var/named/demotecadmin.net.db
Sample output;
zone demotecadmin.net/IN: loaded serial 3013040200 OK
3. Check Configuration file in Older version of Bind
If you are using an older version of the bind, you can have also checked the configuration using the 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
1 Comment
Is there a Windows port of this? Or even an online version? I had exported from one DNS (cloudflare) and now am trying to import to another (Godaddy) and the proceess shows one error, but not what or where that error is?
I am thinking that others could find this same issue using a windows os.