How To Scan DNS BIND Conf File For Errors On Fedora
What is BIND?
BIND (Berkeley Internet Name Domain) is an implementation of the DNS (Domain Name System) protocols. BIND includes a DNS server (named), which resolves host names to IP addresses; a resolver library (routines for applications to use when interfacing with DNS); and tools for verifying that the DNS server is operating properly.
When you install BIND on Fedora, BIND comes with command line utilities that you can use to check your DNS status, DNS statistics and even DNS configuration file.
Here’s a quick post on how to check your DNS BIND Conf file for errors. As a requirement, DNS BIND should be currently installed from your Fedora box.
To check and scan DNS BIND configuration file for possible errors, simply issue
# named-checkconf /etc/named.conf
If you are running a chrooted-BIND, simply issue
# named-checkconf /var/named/chroot/etc/named.conf
Issuing the above commands would display any erroneous DNS BIND configuration lines. If you did not see any output from your screen, that is a good sign that your DNS BIND service would start normally.
As an example result of using named-checkconf :
# named-checkconf /var/named/chroot/etc/named.conf
/var/named/chroot/etc/named.conf:28: missing ‘;’ before ‘}’
The above simply means that DNS bind is expecting a character from line 28 which is currenty missing from DNS BIND configuration file. DND BIND is expecting either the ; or } character , which is usually located at the end line from the DNS conf file.
