刷新服务
cd /free_cicdfs0/compose/bind9
docker-compose down; docker-compose up -d
修改配置文件
新版本 配置文件 大致结构发生了一些改变
cat /free_cicdfs0/data/bind9/etc/bind/named.conf
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
从 114 缓存 查询 数据
cat > /free_cicdfs0/data/bind9/etc/bind/named.conf.options <<"EOF"
# include "/etc/rndc.key";
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndckey"; };
};
options {
// set no
dnssec-enable no;
dnssec-validation no;
listen-on port 53 { any; };
allow-query { any; };
forwarders {
114.114.114.114;
};
};
EOF
chmod 777 -R /free_cicdfs0/data/bind9/
chown root:root -R /free_cicdfs0/data/bind9/
chown root:named -R /free_cicdfs0/data/bind9/
docker-compose up -d
# log error
couldn't add command channel 127.0.0.1#953: file not found
docker cp -a bind9:/etc/bind /free_cicdfs0/data/bind9/etc/
docker cp -a bind9:/var/lib/bind /free_cicdfs0/data/bind9/var/lib/
可以 dig 无法 ping
broken trust chain resolving 'baidu.com/AAAA/IN': 114.114.114.114#53
解决:
由于是局域网内非法DNS,所以将DNS安全关闭.
[root@192-168-174-42 ~]# vim /etc/named.conf
将下面的两项设置为no
dnssec-enable no;
dnss