Rabu, 27 Agustus 2014

Check BIND – DNS Server configuration file for errors

by  on SEPTEMBER 21, 2007 · 12 COMMENTS· LAST UPDATED OCTOBER 12, 2007
You can use a tool called named- checkconf to check BIND dns server (named daemon) configuration file syntax under Linux / UNIX. It checks the syntax, but not the semantics, of a named configuration file i.e. it can check for syntax errors or typographical errors but cannot check for wrong MX / A address assigned by you. Nevertheless, this is an excllent tool for troubleshooting DNS server related problems.

How do I check my bind configuration for errors?

Simply run command as follows:
# named-checkconf /etc/named.conf
You may want to chroot to directory so that include directives in the configuration file are processed as if run by a similarly chrooted named:
# named-checkconf -t /var/named/chroot /etc/named.conf
If there is no output, the configuration is considered correct and you can safely restart or reload bind configuration file. If there is an error it will be displayed on screen:
# named-checkconf /etc/named.conf
Output:
/etc/named.conf:58: open: /etc/named.root.hints: file not found

How do I check my zone file configuration for errors?

Use named-checkzone to check the zone files as follows: named-checkzone nixcraft.com /var/named/zone.nixcraft.com

Tidak ada komentar:

Posting Komentar