3 # This class installs and configures unbound
21 file { '/var/lib/unbound':
25 require => Package['unbound'],
28 file { '/var/lib/unbound/root.key':
34 source => 'puppet:///modules/unbound/root.key'
36 file { '/var/lib/unbound/debian.org.key':
42 source => 'puppet:///modules/unbound/debian.org.key'
44 file { '/etc/unbound/unbound.conf':
45 content => template('unbound/unbound.conf.erb'),
48 File['/var/lib/unbound/root.key'],
49 File['/var/lib/unbound/debian.org.key']
51 notify => Service['unbound']
54 if getfromhash($site::nodeinfo, 'misc', 'resolver-recursive') {
55 if getfromhash($site::nodeinfo, 'hoster', 'allow_dns_query') {
56 @ferm::rule { 'dsa-dns':
58 description => 'Allow nameserver access',
59 rule => sprintf('&TCP_UDP_SERVICE_RANGE(53, (%s))', join_spc(filter_ipv4(getfromhash($site::nodeinfo, 'hoster', 'allow_dns_query')))),
61 @ferm::rule { 'dsa-dns6':
63 description => 'Allow nameserver access',
64 rule => sprintf('&TCP_UDP_SERVICE_RANGE(53, (%s))', join_spc(filter_ipv6(getfromhash($site::nodeinfo, 'hoster', 'allow_dns_query')))),