dns关闭ipv6

发现dns服务器上log

Apr 19 18:39:54 landnsbak named[30011]: FORMERR resolving 'ns-cnc2.qq.com/AAAA/IN': 125.39.57.100#53
Apr 19 18:39:54 landnsbak named[30011]: FORMERR resolving 'ns-cnc2.qq.com/AAAA/IN': 111.161.107.195#53
Apr 19 18:39:54 landnsbak named[30011]: FORMERR resolving 'ns-cnc1.qq.com/AAAA/IN': 111.161.107.195#53
Apr 19 18:39:54 landnsbak named[30011]: FORMERR resolving 'ns-cnc1.qq.com/AAAA/IN': 125.39.57.100#53
Apr 19 18:39:54 landnsbak named[30011]: FORMERR resolving 'ns-cnc1.qq.com/AAAA/IN': 111.161.104.17#53
Apr 19 18:39:54 landnsbak named[30011]: FORMERR resolving 'ns-cnc2.qq.com/AAAA/IN': 140.207.128.140#53
Apr 19 18:39:54 landnsbak named[30011]: FORMERR resolving 'ns-cnc2.qq.com/AAAA/IN': 111.161.104.17#53
Apr 19 18:39:54 landnsbak named[30011]: FORMERR resolving 'ns-cnc1.qq.com/AAAA/IN': 140.207.128.140#53


解决方法

第一种:直接编译配置文件/etc/sysconfig/named,去除去IPv6的解析,只解析IPv4

OPTIONS="whatever" 改为  OPTIONS="-4",

注意OPTIONS选项的值可以是:whatever、-4、-6中的一个


第二种:禁用IPv6也是可以的
(1)编辑配置文件/etc/sysconfig/network,然后将NETWORKING_IPV6=YES改为NETWORKING=no
(2)关闭ip6tables这个服务
(3)向/etc/modprobe.conf文件中,添加
alias ipv6 off 
alias net-pf-10 off

你可能感兴趣的:(dns,linux)