配置DNS转发服务器

1、装包:

 #yum -y install bind-chroot
 #yum -y install bind

2、#vim /etc/name.conf

listen-on port 53 { 本机IP; };
//listen-on-v6 port 53 { ::1; };
allow-query { any; };       //允许任何地址查询
forwarders { 202.106.196.115; };		//转发到联通NDS
dnssec-enable no;  //是否支持DNSSEC开关,默认为yes
dnssec-validation no;  //是否进行DNSSEC确认开关,默认为yes

3重启服务测试

#systemctl restart named
#netstat -anultp | grep :53
#echo "nameserver 本机IP" > /etc/resolv.conf 
#nslookup www.baidu.com

在这里插入图片描述
出现上图表示成功

猜你喜欢

转载自blog.csdn.net/qq_38900565/article/details/83869495