{"id":2123,"date":"2013-06-27T11:48:32","date_gmt":"2013-06-27T03:48:32","guid":{"rendered":"http:\/\/rmohan.com\/?p=2123"},"modified":"2013-06-27T11:48:32","modified_gmt":"2013-06-27T03:48:32","slug":"check-dns-configuration-file-bind","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=2123","title":{"rendered":"Check DNS Configuration file ( BIND )"},"content":{"rendered":"<p>named-checkconf checks the syntax only of a named ( bind ) configuration file. The file is parsed and checked for syntax errors, along with all files included by it. If there are no file is specified with command, \/etc\/named.conf is read by default.<\/p>\n<p>Tip 1: Check your dns ( bind ) configuration .<\/p>\n<p>In case of any changes done in bind configuration, I recommend to check dns configuration file before restarting service.<\/p>\n<p># named-checkconf \/etc\/named.conf<br \/>\nIf bind is running in chroot environment use below command also along with above command<\/p>\n<p># named-checkconf -t \/var\/named\/chroot \/etc\/named.conf<br \/>\nAbove command will show nothing if there are no error found in configuration file. In case of any error will displayed as output.<\/p>\n<p>Tip 2: Check bind zone file using named-checkzone.<\/p>\n<p>To check the syntax of zone file use command as below. It will show result in both cases.<\/p>\n<p># named-checkzone rmohan.net \/var\/named\/rmohan.net.db<br \/>\nSample output;<\/p>\n<p>zone rmohan.net\/IN: loaded serial 3013040200<br \/>\nOK<br \/>\nTip 3: Check configuration file in older version of bind.<\/p>\n<p>If you are using older version of bind, you can have also check the configuration using below command.<\/p>\n<p># service named configtest<br \/>\nSample Outut:<\/p>\n<p>zone tool.com\/IN: loaded serial 42<br \/>\nzone localhost\/IN: loaded serial 42<br \/>\nzone 1.168.192.in-addr.arpa\/IN: loaded serial 1997022700<br \/>\nzone 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<br \/>\nzone 255.in-addr.arpa\/IN: loaded serial 42<br \/>\nzone 0.in-addr.arpa\/IN: loaded serial 42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>named-checkconf checks the syntax only of a named ( bind ) configuration file. The file is parsed and checked for syntax errors, along with all files included by it. If there are no file is specified with command, \/etc\/named.conf is read by default.<\/p>\n<p>Tip 1: Check your dns ( bind ) configuration .<\/p>\n<p>In case [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2123"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2123"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2123\/revisions"}],"predecessor-version":[{"id":2125,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2123\/revisions\/2125"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}