Set a saner max-journal-size than unlimited
[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 <% if scope.function_has_role(['dns_secondary']) -%>
46         rate-limit {
47                 responses-per-second 25;
48                 window 5;
49                 slip 5;
50                 qps-scale 250;
51         };
52 <% end -%>
53
54         max-journal-size 100K;
55 };
56
57 logging {
58
59         channel queries {
60 <% if classes.include?('named::geodns') -%>
61                 file "/var/log/bind9/geoip-query.log" versions 4 size 40m;
62 <% else -%>
63                 file "/var/log/bind9/named-query.log" versions 4 size 40m;
64 <% end -%>
65                 print-time yes;
66                 print-category yes;
67         };
68         category queries { queries; };
69         category lame-servers { null; };
70
71         channel transfers {
72                 file "/var/log/bind9/named-transfers.log" versions 4 size 40m;
73                 print-time yes;
74                 print-category yes;
75         };
76         category xfer-out { transfers; };
77         category notify { transfers; };
78
79 };
80
81 <% if classes.include?('named::authoritative') -%>
82 include "/etc/bind/named.conf.puppet-shared-keys";
83 <% end -%>