dns/bind: fixed whitelists (#763)

This commit is contained in:
Michael
2018-07-27 16:56:22 +02:00
committed by Franco Fichtner
parent 00f7b872d3
commit 36c21ae0ff
5 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -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
@@ -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
@@ -6,5 +6,4 @@ $TTL 86400
864000
3600 )
@ NS localhost.
$INCLUDE /usr/local/etc/namedb/whitelist.inc
$INCLUDE /usr/local/etc/namedb/dnsbl.inc
@@ -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 %}
@@ -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