Setup Master-Slave DNS Server Using “Bind” Tools in RHEL/CentOS 6.5

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Babin Lonston

I'm Working as a System Administrator for last 10 year's with 4 years experience with Linux Distributions, fall in love with text based operating systems.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

83 Responses


    After I set up the slave server and ran the command ls -l /var/named/slaves or ls -l /var/named/slaves/ or for the reverse zone total number of files are zero why my allow transfer didn’t work from the master.

    I set up the master server correctly and getting the answer for forward and reverse lockups i define my domain as

  2. Ashutosh Athawale says:


    Great article and easy to understand.

    I would like to request if we can have a link to download packages from, as i downloaded the packages but many of the libraries are missing due to which a person ends us resolving the dependencies and adding libraries.

    It will be a great help if we get the required lib and packages.

  3. Howrde says:

    All this is very nice but for a newbie trying to set up the DNS it’s tough to get through. I only have one server and your comment doesn’t show how to do this. So, thanks for trying…

  4. Rajat Upreti says:

    Hi, if any of you could help me with master-slave dns configuration where the master is using dynamic dns in rhel 7, it would be a great help

  5. Ninoslav says:

    Hi Babin,

    All tho this is a good tutorial, i need to point out that your configuration of reverse zone is wrong, and that the check for it doesn’t work.

    And that is because reverse zones there is no need for any type of record beside PTR records, and that since we defined reverse zone as we should check that when checking configuration.

    The reverse zone file for this tutorial should be defined as:

    $TTL 1D
    @ IN SOA (
    2017091402 ; serial
    1D ; refresh
    1H ; retry
    1W ; expire
    3H ) ; minimum

    ; Name server's
    @ IN NS
    @ IN NS

    ;Hosts in Domain
    200 IN PTR
    201 IN PTR

    And the check for zone should be:

    named-checkzone /var/named//var/named/

    I hope that my comment helps someone out.



  6. Howard Rifkind says:

    Thank you for all of the above, very helpful. I only have one physical machine so is it O.K. if I don’t configure a slave machine configuration? Thanks

  7. Azamatjon says:

    I didn’t understand the section for reverse zone file in /var/ zone”…..” that part

    please explain me what to write there

  8. Shrikant says:

    Typo at “Real Also: Setup DNS Cache Server in Ubuntu”

    Correct it to ‘Read’ :)

  9. Ishmael says:

    Good illustration but things as Serial number where do they come from are they important If I leave 0, default

    • @IShmael,

      You can’t leave it 0 instead you need to start from 00 which represent the date. If we are about to add new entry it’s good to increase the serial number by an incremental method.

  10. saeed Tehrani says:

    has no address records (A or AAAA) , I had the same problem for this reason I added
    8 @ IN NS
    9 @ IN NS
    10 @ IN PTR
    these following lines
    11 @ IN A
    12 @ IN A

Leave a Reply to saeed Tehrani Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.