centos7安装dns正向解析2
作者:互联网
yum -y install bind bind-utils
直接最下面添加IP段,写反的即可
options {
directory "/var/named";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
#域名1
zone "jbjb.com" IN {
type master;
file "jbjb.com.zone";
};
#反向解析将网段写反的即可
zone "8.168.192.in-addr.arpa" {
type master;
file "192.168.8.arpa";
};
切换到数据库
cd /var/named/
cp named.loopback 192.168.8.arpa
编辑vim 192.168.8.arpa文件反解析使用
$TTL 1D
8.168.192.in-addr.arpa. IN SOA ns1.jbjb.com. rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS ns1.jbjb.com.
177 PTR www.jbjb.com.
重启生效
systemctl restart named.service
防火墙放行
firewall-cmd --permanent --add-service=dns
firewall-cmd --reload
客户端测试反向解析
标签:named,file,com,arpa,192.168,centos7,dns,解析,jbjb 来源: https://blog.csdn.net/weixin_42562106/article/details/112590193