• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How to Check DNS ( BIND ) Configuration File

Written by Rahul, Updated on April 4, 2013
Linux Tutorials bind, bind configure check, dns, named

Command 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.

Tip 1: Check DNS (Bind) Configuration

In case of any changes done in bind configuration, I recommend to check dns configuration file before restarting service.

# named-checkconf /etc/named.conf

If bind is running in chroot environment use below command also along with above command

# named-checkconf -t /var/named/chroot /etc/named.conf

Above command will show nothing if there are no error found in configuration file. In case of any error will displayed as output.

Tip 2: Check Bind Zone File

To check the syntax of zone file use command as below. It will show result in both cases.

# named-checkzone demotecadmin.net /var/named/demotecadmin.net.db

Sample output;

zone demotecadmin.net/IN: loaded serial 3013040200
OK

Tip 3: Check Configuration file in Older version of Bind

If you are using older version of bind, you can have also check the configuration using below command.

# service named configtest

Sample Outut:

zone tool.com/IN: loaded serial 42
zone localhost/IN: loaded serial 42
zone 1.168.192.in-addr.arpa/IN: loaded serial 1997022700
zone 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
zone 255.in-addr.arpa/IN: loaded serial 42
zone 0.in-addr.arpa/IN: loaded serial 42

Share it!
Share on Facebook
Share on Twitter
Share on Google+
Share on Reddit
Share on Tumblr
Rahul
Rahul
Connect on Facebook Connect on Twitter Connect on Google+

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Related Posts

  • Linux nslookup Command Help and Examples for DNS Lookup

    June 23, 2017
  • How to Configure DNS Settings on Ubuntu & LinuxMint

    October 21, 2015
  • How to Setup Forward Only DNS Server on Ubuntu & LinuxMint

    October 8, 2015
  • How to Configure DNS Server on Ubuntu & LinuxMint

    October 8, 2015
  • How To Clear DNS Cache on Windows

    February 17, 2015

Leave a Reply

Cancel reply

Popular Posts

  • How to Setup Squid Proxy Server on Ubuntu 18.04 & 16.04
  • How To Install Zabbix Agent on Debian 9/8
  • How to Install and Configure Squid Proxy on Debian 9
  • How to Remove “public/index.php” from URL in Laravel
  • How To Install Wine 3 on Debian 9 (Stretch)
All rights reserved. © 2013-2018 TecAdmin.net. This site uses cookies. By using this website you agree our term and services