• 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 September 17, 2019

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 is no file is specified with the command, /etc/named.conf is read by default.

1. Check DNS (Bind) Configuration

In case of any changes done in bind configuration, I recommend checking the DNS configuration file before restarting service.

named-checkconf /etc/named.conf

If the 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 is no error found in the configuration file. In case of any error will displayed as output.

2. Check Bind Zone File

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

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

Sample output;

zone demotecadmin.net/IN: loaded serial 3013040200
OK

3. Check Configuration file in Older version of Bind

If you are using an older version of the bind, you can have also checked 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 LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

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

1 Comment

  1. Avatar Chris Owen Reply
    August 29, 2020 at 5:20 pm

    Is there a Windows port of this? Or even an online version? I had exported from one DNS (cloudflare) and now am trying to import to another (Godaddy) and the proceess shows one error, but not what or where that error is?
    I am thinking that others could find this same issue using a windows os.

Leave a Reply Cancel reply

Popular Posts

  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
  • How To Install NVM on macOS with Homebrew 0
  • (Solved) apt-add-repository command not found – Ubuntu & Debian 0
  • How to Install .NET Core on Debian 10 0
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy