DNS master / slave 架設

master 的 /etc/named.conf :

zone "samtseng.co.cc" {
        type master;
        file "samtseng.co.cc.zone";
        allow-transfer {
                xxx.xxx.xxx.xxx; // slave dns ip address
        };
};
zone "xxx.xxx.xxx.in-addr.arpa" {
        type master;
        file "xxx.xxx.xxx.zone";
        allow-transfer {
                xxx.xxx.xxx.xxx; // slave dns ip address
        };
};

slave 的 /etc/named.conf :

zone "samtseng.co.cc" {
        type slave;
        file "samtseng.co.cc.zone";
        masters {
                xxx.xxx.xxx.xxx; // master dns ip address
        };
};
zone "xxx.xxx.xxx.in-addr.arpa" {
        type slave;
        file "xxx.xxx.xxx.zone";
        masters {
                xxx.xxx.xxx.xxx; // master dns ip address
        };
};

注意 : /var/named/chroot/var/named 目錄的權限要設成 named:named 750, slave 不可以出現 “samtseng.co.cc.zone” & “xxx.xxx.xxx.in-addr.arpa” 檔案. 要不然會沒辦法成功的當 dns slave. 另外, selinux記得關掉.