diff --git a/dns/bind/Makefile b/dns/bind/Makefile index 4a8dcea55..6f548745b 100644 --- a/dns/bind/Makefile +++ b/dns/bind/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= bind -PLUGIN_VERSION= 0.6 +PLUGIN_VERSION= 0.7 PLUGIN_COMMENT= BIND domain name service PLUGIN_DEPENDS= bind913 PLUGIN_MAINTAINER= m.muenz@gmail.com diff --git a/dns/bind/src/opnsense/service/templates/OPNsense/Bind/+TARGETS b/dns/bind/src/opnsense/service/templates/OPNsense/Bind/+TARGETS index 6a5f5601b..5fc84ac33 100644 --- a/dns/bind/src/opnsense/service/templates/OPNsense/Bind/+TARGETS +++ b/dns/bind/src/opnsense/service/templates/OPNsense/Bind/+TARGETS @@ -2,4 +2,5 @@ blacklist.db:/usr/local/etc/namedb/master/blacklist.db named:/etc/rc.conf.d/named named.conf:/usr/local/etc/namedb/named.conf rndc.conf:/usr/local/etc/namedb/rndc.conf +whitelist.db:/usr/local/etc/namedb/master/whitelist.db whitelist.inc:/usr/local/etc/namedb/whitelist.inc diff --git a/dns/bind/src/opnsense/service/templates/OPNsense/Bind/blacklist.db b/dns/bind/src/opnsense/service/templates/OPNsense/Bind/blacklist.db index a83c511af..afda627e1 100644 --- a/dns/bind/src/opnsense/service/templates/OPNsense/Bind/blacklist.db +++ b/dns/bind/src/opnsense/service/templates/OPNsense/Bind/blacklist.db @@ -6,5 +6,4 @@ $TTL 86400 864000 3600 ) @ NS localhost. -$INCLUDE /usr/local/etc/namedb/whitelist.inc $INCLUDE /usr/local/etc/namedb/dnsbl.inc diff --git a/dns/bind/src/opnsense/service/templates/OPNsense/Bind/named.conf b/dns/bind/src/opnsense/service/templates/OPNsense/Bind/named.conf index e8de44ea7..f1cb1dcb4 100644 --- a/dns/bind/src/opnsense/service/templates/OPNsense/Bind/named.conf +++ b/dns/bind/src/opnsense/service/templates/OPNsense/Bind/named.conf @@ -28,7 +28,7 @@ options { {% if helpers.exists('OPNsense.bind.dnsbl.enabled') and OPNsense.bind.dnsbl.enabled == '1' %} {% if helpers.exists('OPNsense.bind.dnsbl.type') and OPNsense.bind.dnsbl.type != '' %} - response-policy { zone "blacklist.localdomain"; }; + response-policy { zone "whitelist.localdomain"; zone "blacklist.localdomain"; }; {% endif %} {% endif %} @@ -68,6 +68,7 @@ zone "0.ip6.arpa" { type master; file "/usr/local/etc/namedb/master/localh {% if helpers.exists('OPNsense.bind.dnsbl.enabled') and OPNsense.bind.dnsbl.enabled == '1' %} {% if helpers.exists('OPNsense.bind.dnsbl.type') and OPNsense.bind.dnsbl.type != '' %} +zone "whitelist.localdomain" { type master; file "/usr/local/etc/namedb/master/whitelist.db"; notify no; check-names ignore; }; zone "blacklist.localdomain" { type master; file "/usr/local/etc/namedb/master/blacklist.db"; notify no; check-names ignore; }; {% endif %} {% endif %} diff --git a/dns/bind/src/opnsense/service/templates/OPNsense/Bind/whitelist.db b/dns/bind/src/opnsense/service/templates/OPNsense/Bind/whitelist.db new file mode 100644 index 000000000..0da0f0fd5 --- /dev/null +++ b/dns/bind/src/opnsense/service/templates/OPNsense/Bind/whitelist.db @@ -0,0 +1,9 @@ +$TTL 86400 +@ IN SOA opnsense.localdomain. hostmaster.opnsense.localdomain. ( + 2018072201 + 28800 + 7200 + 864000 + 3600 ) +@ NS localhost. +$INCLUDE /usr/local/etc/namedb/whitelist.inc