DNS主從服務器配置vim
要求主從服務器能夠ping通
1.主DNS配置
yum -y install bind*
service named restart
chkconfig named on
vim /var/named/chroot/etc/named.conf
listen-on port 53 { any; };
listen-on-v6 port 53 { any; };
allow-query { any; };
vim /var/named/chroot/etc/named.rfc1912.zones
cd /var/named/chroot/var/named/
cp -p named.localhost example.com.zone
zone "example.com" IN {
type master;
file "example.com.zone";
allow-update { none; };
};
service named restart
從服務器配置
yum -y install bind*
service named restart
chkconfig named on
vim /var/named/chroot/etc/named.conf
listen-on port 53 { any; };
listen-on-v6 port 53 { any; };
allow-query { any; };
vim /var/named/chroot/etc/named.rfc1912.zones
zone "example.com" IN {
type slave;
file "slaves/example.com.zone";
masters {192.168.1.13;};
};
service named restart