We can check a DNS zone file configuration for errors. The BIND dns server provides a good tool to check the validity of a zone file.
named-checkzone is such a tool that can be made use of.
named-checkzone command syntaxnamed-checkzone {zonename} {filename}
Where,
zonename : The domain name of the zone being checked.
filename : The name of the zone file.
For example:
To check the dns zone of your domain[root@server ~]# named-checkzone yourcomain.com /var/named/zone.yourdomain.com
Output
---------
zone yourdomain.com/IN: loaded serial xxxxxxxxx
OK
If you see "OK" as result, the zone file is properly configured.
Check your BIND – DNS Server configuration file for errors You can use a tool called
named- checkconf to check BIND dns server configuration file syntax. This is excellent tool that checks the syntax of a named configuration file. It can check for syntax errors or typographical errors but cannot check for wrong MX / A address which is given.
To check bind configuration for errors, run the following command:-
# named-checkconf /etc/named.conf
If there is no output, the configuration is considered correct and If there is an error it will be displayed on the screen.
Give a try when you face with dns related issues.