]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/named/templates/named.conf.options.erb
bind rate limit everywhere
[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   str = ''
9   scope.lookupvar('site::localinfo').keys.sort.each do |node|
10       if scope.lookupvar('site::localinfo')[node]['nagiosmaster']
11           scope.lookupvar('site::allnodeinfo')[node]['ipHostNumber'].each do |ip|
12               str += "\t" + ip + "/32;\n"
13           end
14       end
15   end
16   str-%>
17 };
18
19 options {
20         directory "/var/cache/bind";
21
22         auth-nxdomain no;    # conform to RFC1035
23         listen-on { ! 127.0.0.1; any; };
24         listen-on-v6 { ! ::1; any; };
25
26         allow-transfer { none; };
27         allow-update { none; };
28 <% if classes.include?("named::geodns") -%>
29         blackhole { 192.168.0.0/16; 10.0.0.0/8; 172.16.0.0/12; };
30 <% end -%>
31
32 <%=
33   allowed='Nagios; '
34
35   str =  "\tallow-recursion { " + allowed + " };\n"
36   str += "\tallow-query { " + allowed + " };\n"
37
38   str
39 -%>
40
41 <% if classes.include?('named::authoritative') or classes.include?('named::geodns') -%>
42         dnssec-enable yes;
43         dnssec-validation yes;
44 <% end -%>
45
46 <% if %w{senfl ravel orff diamond}.include?(hostname) -%>
47         rate-limit {
48                 responses-per-second 25;
49                 window 5;
50                 slip 5;
51                 qps-scale 250;
52         };
53 <% end -%>
54
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
72