Commands to check the syntax of Bind configuration file and DNS zone syntax

Commands to check the syntax of Bind configuration file and DNS zone syntax:

To check the syntax of named.conf file:
***************************************

[root@bash ~]# named-checkconf /etc/named.conf
[root@bash~]#

To check the syntax of zone file of a domain:
********************************************

===
named-checkzone [domain name] /var/named/domain.db
===

Example:

====
[root@bash ~]# named-checkzone example.com /var/named/example.com.db
zone kb.com/IN: loaded serial 2006032401
OK
[root@ bash~]#
====

If everything is correct, it will show the serial number with which the zone file is loaded. Otherwise, it will give error message indicating the line number at which the error occurred.

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: