11 file { '/var/lib/unbound':
15 require => Package['unbound'],
18 file { '/var/lib/unbound/root.key':
24 source => 'puppet:///modules/unbound/root.key'
26 file { '/var/lib/unbound/debian.org.key':
32 source => 'puppet:///modules/unbound/debian.org.key'
34 file { '/etc/unbound/unbound.conf':
35 content => template('unbound/unbound.conf.erb'),
38 File['/var/lib/unbound/root.key'],
39 File['/var/lib/unbound/debian.org.key']
41 notify => Service['unbound']
44 if getfromhash($site::nodeinfo, 'misc', 'resolver-recursive') {
45 if getfromhash($site::nodeinfo, 'hoster', 'allow_dns_query') {
46 @ferm::rule { 'dsa-dns':
48 description => 'Allow nameserver access',
49 rule => sprintf('&TCP_UDP_SERVICE_RANGE(53, (%s))', join_spc(filter_ipv4(getfromhash($site::nodeinfo, 'hoster', 'allow_dns_query')))),
51 @ferm::rule { 'dsa-dns6':
53 description => 'Allow nameserver access',
54 rule => sprintf('&TCP_UDP_SERVICE_RANGE(53, (%s))', join_spc(filter_ipv6(getfromhash($site::nodeinfo, 'hoster', 'allow_dns_query')))),