Add a couple of ACLs
[mirror/dsa-puppet.git] / modules / named / templates / named.conf.options.erb
1 //
2 // THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
3 // USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
4 //
5
6 acl Nagios {
7 <%=
8   roles = scope.lookupvar('site::roles')
9   str = ''
10   roles['nagiosmaster'].each do |node|
11           scope.lookupvar('site::allnodeinfo')[node]['ipHostNumber'].each do |ip|
12               str += "\t" + ip + "/32;\n"
13           end
14   end
15   str-%>
16 };
17
18 options {
19         directory "/var/cache/bind";
20
21         auth-nxdomain no;    # conform to RFC1035
22         listen-on { ! 127.0.0.1; any; };
23         listen-on-v6 { ! ::1; any; };
24
25         allow-transfer { none; };
26         allow-update { none; };
27 <% if classes.include?("named::geodns") -%>
28         blackhole { 192.168.0.0/16; 10.0.0.0/8; 172.16.0.0/12; };
29 <% end -%>
30
31 <%=
32   allowed='Nagios; '
33
34   str =  "\tallow-recursion { " + allowed + " };\n"
35   str += "\tallow-query { " + allowed + " };\n"
36
37   str
38 -%>
39
40 <% if classes.include?('named::authoritative') or classes.include?('named::geodns') -%>
41         dnssec-enable yes;
42         dnssec-validation yes;
43 <% end -%>
44
45         // Defaults are 100 and 10, causing lots and lots of tiny updates.
46         // This way, I hope, we'll get fewer (and thus bigger) updates. -- weasel
47         sig-signing-nodes 5000;
48         sig-signing-signatures 1000;
49
50         max-journal-size 100K;
51 };
52
53 logging {
54
55         channel queries {
56 <% if classes.include?('named::geodns') -%>
57                 file "/var/log/bind9/geoip-query.log" versions 4 size 40m;
58 <% else -%>
59                 file "/var/log/bind9/named-query.log" versions 4 size 40m;
60 <% end -%>
61                 print-time yes;
62                 print-category yes;
63         };
64         category queries { queries; };
65         category lame-servers { null; };
66
67         channel transfers {
68                 file "/var/log/bind9/named-transfers.log" versions 4 size 40m;
69                 print-time yes;
70                 print-category yes;
71         };
72         category xfer-out { transfers; };
73         category notify { transfers; };
74
75 };
76
77 <% if scope.function_has_role(['dns_primary']) -%>
78 masters "easydns-masters" {
79         // https://cp.easydns.com/manage/domains/secondary/edit.php
80         64.68.200.91;
81         205.210.42.80;
82 };
83 acl "easydns-ACL" {
84         // https://cp.easydns.com/manage/domains/secondary/edit.php
85         //64.68.200.91/32;
86         //205.210.42.80/32;
87         key 82.195.75.91-key ;
88 };
89
90 masters "rcode0-masters" {
91         83.136.34.7;   // rcode0.net ipv4 ntfy
92         2A02:850:8::6; // rcode0.net ipv6 ntfy
93 };
94 acl "rcode0-ACL" {
95         83.136.34.0/27;  // rcode0.net ipv4 axfr
96         2A02:850:8::/47; // rcode0.net ipv6 axfr
97 };
98
99 masters "dnsnode-masters" {
100         192.36.144.222; // zork-b.sth.dnsnode.net
101         192.36.144.218; // zork-c.sth.dnsnode.net
102 };
103 acl "dnsnode-ACL" {
104         192.36.144.222; // zork-b.sth.dnsnode.net
105         192.36.144.218; // zork-c.sth.dnsnode.net
106 };
107 <% end -%>
108
109 include "/etc/bind/named.conf.puppet-shared-keys";