Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Setup a Master-Slave dns server

Posted on 2010-01-10
Medium Priority
Last Modified: 2012-05-08
I'm trying to setup a master-slave dns server in the simplest way on Centos 5.
I have one BIND dns server with default configuration and it is working finefor the zone "mylab.com" which responses to the queries well.
For the slave server I copied all configuration except "mylab.com.zone" from master to slave and changed this part in named.conf of slave server :

zone "mylab.com" in{
        type slave;
        file "mylab.com.zone";
        masters {
        allow-update { none; };

the named service starts in Slave node but does not resolve queries form mylab.com zone.
Actually I do not know what step is needed for the slave to be updated by master.
The filewall and SELinux is off on both nodes and they have network connectivity.
There is not any restriction like allow-transfer in configuration files.

Since they are both on Vmware workstation with bridged networking I could run a packet analyzer on the windows host and there is no sign of zone transfer between two nodes.

I was wondering if anyone could tell me what is the problem or what am I missing.
Question by:v_shalchian
LVL 29

Accepted Solution

fosiul01 earned 2000 total points
ID: 26281329
The best think is

copy mylab.com.zone from Master to Slave manually First.

put the mylab.com.zone in /var/named/chroot/var/named/slaves directory

and put the permisison

chown named:named mylab.com.zone

Now change anything on the master file, increase the serial number.
you will see those changes in slave server

LVL 41

Expert Comment

ID: 26281444
Did you enable allow-transfer on the master?
What is the zone definition on the master?
LVL 26

Expert Comment

ID: 26283002
Did it do the zone transfer when you started/restarted bind on the slave? Remember zone transfers are done over TCP, so you need to open TCP/53 at least to the slave on the master.

Author Comment

ID: 26283050
Finally my slave node updated.
The "chown named:named mylab.com.zone" command helped and I took some time for slave to be updated.
I also made a chnge in the /etc/sysconfig/named and uncommented the below line :

ENABLE_ZONE_WRITE=yes  --  If SELinux is disabled, then allow named to write
#                            its zone files and create files in its $ROOTDIR/var/named
#                            directory, necessary for DDNS and slave zone transfers.
#                            Slave zones should reside in the $ROOTDIR/var/named/slaves
#                            directory, in which case you would not need to enable zone
#                            writes. If SELinux is enabled, you must use only the
#                            'named_write_master_zones' variable to enable zone writes.

Thank you for your help

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question