1、服务安装
apt install -y bind9 dnsutils
2、配置named.conf
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
3、配置named.conf.options
options {
directory "/var/cache/bind";
allow-query { 0.0.0.0/0; };
recursion yes;
forward first;
forwarders {
116.228.111.18;
180.168.255.118;
};
dnssec-enable no;
dnssec-validation no;
// auth-nxdomain no;
listen-on { any; };
listen-on-v6 { any; };
};
4、配置named.conf.local
zone "12par.tech" {
type master;
file "/etc/bind/db.12par.tech";
};
zone "siro.tech" {
type master;
file "/etc/bind/db.siro.tech";
};
5、配置db.12par.tech
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA localhost. root.localhost. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS www.12par.tech.
www IN A 192.168.160.80
ng IN A 192.168.160.80
5、重启bind服务
systemctl restart bind9