apt-get install bind9 -y
apt-get install bind9-host dnsutils
ls -l /etc/bind
vim /etc/bind/name.conf.options
添加:allow-query { any; };
dnssec-validation no;
反注释
forwarders {
0.0.0.0;
};
修改为:
forwarders {
223.5.5.5;
223.6.6.6;
114.114.114.114;
};
修改后如下:
options {
directory "/var/cache/bind";
allow-query { any; };
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
forwarders {
223.5.5.5;
223.6.6.6;
114.114.114.114;
};
//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See https://www.isc.org/bind-keys
//========================================================================
dnssec-validation no;
listen-on-v6 { any; };
};
systemctl restart named
6.配置电脑DNS 为BIND服务地址,上网测试