配置主配置文件中的反向区域声明文件
复制以下5行
zone "1.0.0.127.in-addr.arpa" IN {
type master;
file "named.loopback";
allow-update { none; };
};
改成
zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.in.zone";
allow-update { 192.168.1.3; };
};
复制正反向区域文件的模板并重新命名为区域配置文件的名字
cp -p /var/named/named.localhost /var/named/s2t110.com.zone
cp -p /var/named/named.loopback /var/named/1.168.192.in.zone
配置正向区域配置文件
vim /var/named/s2t110.com.zone
配置反向区域配置文件
vim /var/named/1.168.192.in.zone
启动bind
service named start
win7测试
从域名服务器
配置主文件
vim /etc/named.conf
options {(把127.0.0.1和localhost改成any)
listen-on port 53 { any; };
……
allow-query { any; };
}
区域声明配置文件
vim /etc/named.rfc1912.zones
配置正向解析
复制一遍(选中第一行,5yy,光标移动到下面p)
zone "localhost" IN {
type master;
file "named.localhost";
allow-update { none; };
};
改成
zone "s2t110.com" IN {
type slave; 当前是从域名服务器
file "slaves/s2t110.com.zone"; 区域配置文件存放位置(/var/named/slaves)
masters { 192.168.1.2; };
};配置反向解析
复制一遍
zone "1.0.0.127.in-addr.arpa" IN {
type master;
file "named.loopback";
allow-update { none; };
};
改成
zone "1.168.192.in-addr.arpa" IN {
type slave;
file "slaves/1.168.192.in.zone";
masters { 192.198.1.2; };
};
启动bind
service named start