Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Linux Tutorials»How To Check bind9 (DNS Server) Configuration Files

    How To Check bind9 (DNS Server) Configuration Files

    By RahulApril 20, 20222 Mins Read

    Command named-checkconf checks the syntax only of a DNS (bind) configuration file. The file is parsed and checked for syntax errors, along with all files included by it. If there is no file specified with the command, /etc/named.conf is read by default.

    Advertisement

    1. Check bind9 (DNS) Configuration

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

    named-checkconf /etc/named.conf 
    

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

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

    The above command will show nothing if there is no error found in the configuration file. In case of any error will be displayed as output.

    2. Check Bind Zone File

    To check the syntax of the zone file using the command 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 the 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
    

    bind bind configure check dns named
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Understanding Reverse DNS: What it is and Why it Matters?

    An Introduction to the “./configure” Command: Compiling Source Code in Linux

    Getting Started with Linux Command line: The Beginning

    View 1 Comment

    1 Comment

    1. Chris Owen on August 29, 2020 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.

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • 20 Basic Linux Commands for the Beginners (Recommended)
    • tail Command in Linux with Examples
    • What is a Orphan Process in Unix/Linux
    • How To Display Warning Message to Unauthorized SSH Access
    • How to Set a Custom SSH Login Banner and MOTD
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.