=============================================================== 主配置文件 named.conf // // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS // server as a caching only nameserver (as a localhost DNS resolver only). // // See /usr/share/doc/bind*/sample/ for example named configuration files. // options { listen-on port 53 { x.x.x.x; }; listen-on-v6 port 53 { ::1; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; allow-query { any; }; recursion yes; dnssec-enable yes; dnssec-validation yes; dnssec-lookaside auto; /* Path to ISC DLV key */ bindkeys-file "/etc/named.iscdlv.key"; # managed-keys-directory "/var/named/dynamic"; }; logging { channel default_debug { file "data/named.run"; severity dynamic; }; }; acl test1{ !x.x.x.x; x.x.x.x/24; x.x.x.x }; acl test2 {x.x.x.x/24;}; acl test3 {any;}; view "aa" { match-clients { test1; }; zone "xxx.cn" IN { type master; file "xxx.cn.zone.test1"; }; include "/etc/named.conf.otherzones"; }; view "bb" { match-clients { test2; }; zone "xxx.cn" IN { type master; file "xxx.cn.zone.test2"; } include "/etc/named.conf.otherzones"; }; view "cc" { match-clients { test3; }; zone "xxx.cn" IN { type forward; forward only; forwarders { x.x.x.x; }; }; include "/etc/named.conf.otherzones"; }; ====================================================================================== 区域数据配置文件 xxx.cn.zone.test1 $TTL 3H @ IN SOA xxx.cn. root.xxx.cn. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum ; NS server.xxx.cn. IN NS xxx.cn. IN MX 10 mail.xxx.cn. @ IN A x.x.x.x my IN A x.x.x.x proxy IN A x.x.x.x test IN A x.x.x.x
时间: 2024-11-05 21:42:43