目标
把www.test.com 解析192.168.22.88
修改主配文件
vim /etc/named.conf
options {
listen-on port 53 { any; };
directory "/var/named";
};
zone "22.168.192.in_addr.arpa" IN { //此处需要倒写网段
type master;
file"192.168.22.arpa";
};
修改数据文件
cd /var/named
cp named.loopback 192.168.22.arpa
vim 192.168.22.arpa
$TTL 1D
22.168.192.in-addr.arpa. IN SOA ns1.test.com. rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS ns1.test.com.
88 PTR www.test.com.
测试
nslookup 192.168.22.88