options { 15 listen-on port 53 { any; }; 16 #listen-on-v6 port 53 { ::1; }; 17 directory "/var/named"; 18 dump-file "/var/named/data/cache_dump.db"; 19 statistics-file "/var/named/data/named_stats.txt"; 20 memstatistics-file "/var/named/data/named_mem_stats.txt"; 21 22 // Those options should be used carefully because they disable port 23 // randomization 24 // query-source port 53; 25 // query-source-v6 port 53; 26 27 allow-query { any; }; 28 allow-query-cache { any; }; 29 forwarders {8.8.8.8;}; 30 forward only; 31 recursion yes; 32 #allow-transfer {any;}; 33 }; 34 35 logging { 36 channel default_debug { 37 file "data/named.run"; 38 severity dynamic; 39 }; 40 }; 41 42 view tianan{ 43 match-clients {any;}; match-destinations {any;}; 45 recursion yes; 46 zone "." IN { 47 type hint; 48 file "named.ca"; 49 }; 51 zone "tianan.com" { type master; file "tianan.com.zone"; allow-query { any; }; }; 52 zone "linux.com" { type master; file "linux.com.zone"; allow-query { any; }; }; 53 }; 54 55 view linux{ 56 match-clients {any;}; 57 match-destinations {any;}; 58 recursion yes; 59 zone "." IN { 60 type hint; 61 file "named.ca"; 62 }; 63 64 zone "example.com" { type master; file "example.com.zone"; allow-query { any; }; }; 65 }; 66 67 view localhost_resolver { 68 match-clients {localhost; }; 69 match-destinations {localhost; }; 70 recursion yes; 71 include "/etc/named.rfc1912.zones"; 72 }; |
$TTL 86400 2 @ IN SOA master.linux.com. root.linux.com ( 3 12 ; serial (d. adams) 4 3H ; refresh 5 15M ; retry 6 1W ; expiry 7 1D ) ; minimum 8 9 IN NS master.linux.com 10 IN A 172.16.41.30 11 master IN A 172.16.41.30 12 www IN A 172.16.41.30 13 mail IN A 172.16.41.30 14 smtp IN A 172.16.41.30 15 pop3 IN A 172.16.41.30 16 @ IN MX 10 mail.linux.com 17 * IN A 172.16.41.30 |
1 $TTL 86400 2 @ IN SOA tianan.com. root.tianan.com ( 3 13 ; serial (d. adams) 4 3H ; refresh 5 15M ; retry 6 1W ; expiry 7 1D ) ; minimum 8 9 IN NS tianan.com 10 IN A 172.16.41.14 11 www IN A 172.16.41.14 12 mail IN A 172.16.41.14 13 * IN A 172.16.41.14 |
1 $TTL 86400 2 @ IN SOA master.example.com. root.example.com ( 3 12 ; serial (d. adams) 4 3H ; refresh 5 15M ; retry 6 1W ; expiry 7 1D ) ; minimum 8 9 IN NS master.example.com 10 IN A 172.16.41.30 11 master IN A 172.16.41.30 12 www IN A 172.16.41.30 13 mail IN A 172.16.41.30 14 smtp IN A 172.16.41.30 15 pop3 IN A 172.16.41.30 16 @ IN MX 10 mail.example.com 17 * IN A 172.16.41.30 |
原帖由 shelmesky 于 2010-1-27 23:09 发表
我在删除了named.conf中的recursion=yes递归查询,删除了forwarder,还删除了zone ".",为什么我在bind所在的服务器上ping example.com,它还是会去根服务器查询呢?按道理不会啊。
view同ACL,按照逐条匹配原则。
“view tianan
match-clients {any;};”
match client已经是any了,客 ...
silty 发表于 2010-01-27 21:55
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |