Do not put our 29.172.in-addr.arpa zone into unbound configs behind fascist firewalls...
authorPeter Palfrader <peter@palfrader.org>
Tue, 9 Oct 2018 18:00:39 +0000 (20:00 +0200)
committerPeter Palfrader <peter@palfrader.org>
Tue, 9 Oct 2018 18:00:42 +0000 (20:00 +0200)
hieradata/br.yaml
hieradata/ynic.yaml
modules/unbound/manifests/init.pp
modules/unbound/templates/unbound.conf.erb

index 1b254ba..970c10b 100644 (file)
@@ -2,3 +2,4 @@
 nameservers:
   - 200.236.31.1
   - 200.17.202.3
+firewall_blocks_dns: true
index c720735..89440d4 100644 (file)
@@ -3,3 +3,4 @@ nameservers:
   - 144.32.169.74
   - 144.32.169.75
   - 144.32.169.76
+firewall_blocks_dns: true
index 88267d1..bb9e4d8 100644 (file)
@@ -7,9 +7,9 @@
 #   include unbound
 #
 class unbound {
-
        $is_recursor   = getfromhash($site::nodeinfo, 'misc', 'resolver-recursive')
        $client_ranges = hiera('allow_dns_query')
+       $firewall_blocks_dns = hiera('firewall_blocks_dns', false)
        $empty_client_range = empty($client_ranges)
        $ns            = hiera('nameservers')
 
@@ -54,7 +54,7 @@ class unbound {
                notify  => Service['unbound']
        }
        file { '/var/lib/unbound/29.172.in-addr.arpa.key':
-               ensure  => present,
+               ensure  => $firewall_blocks_dns ? { true  => 'absent', default => 'present' },
                replace => false,
                owner   => unbound,
                group   => unbound,
index 9276675..7ffc35f 100644 (file)
@@ -48,12 +48,15 @@ server:
        prefetch: yes
        prefetch-key: yes
 
+
+<% if not hiera('firewall_blocks_dns', false) %>
 local-zone: "29.172.in-addr.arpa" nodefault
 forward-zone:
        name: "29.172.in-addr.arpa"
        forward-host: geo1.debian.org
        forward-host: geo2.debian.org
        forward-host: geo3.debian.org
+<% end -%>
 
 # recursive: <%= @is_recursor ? "y" : "n" %>
 <% if not @is_recursor -%>