mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-03 22:08:11 -04:00
Merge pull request #2147 from fraenki/bind_115
dns/bind: add support for transfer-source[-v6] options
This commit is contained in:
commit
dccbca215f
5 changed files with 42 additions and 6 deletions
|
|
@ -1,5 +1,5 @@
|
|||
PLUGIN_NAME= bind
|
||||
PLUGIN_VERSION= 1.14
|
||||
PLUGIN_VERSION= 1.15
|
||||
PLUGIN_COMMENT= BIND domain name service
|
||||
PLUGIN_DEPENDS= bind916
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
|
|
|
|||
|
|
@ -8,6 +8,10 @@ necessary for asking and answering name service questions.
|
|||
Plugin Changelog
|
||||
================
|
||||
|
||||
1.15
|
||||
|
||||
* Add support for "Transfer Source [IP|IPv6]" options
|
||||
|
||||
1.14
|
||||
|
||||
* Reject built-in ACL names
|
||||
|
|
|
|||
|
|
@ -33,6 +33,20 @@
|
|||
<type>text</type>
|
||||
<help>Set the port the service should listen to.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>general.transfersource</id>
|
||||
<label>Transfer Source IP</label>
|
||||
<type>text</type>
|
||||
<advanced>true</advanced>
|
||||
<help>Specify the IPv4 address used as a source for zone transfers.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>general.transfersourcev6</id>
|
||||
<label>Transfer Source IPv6</label>
|
||||
<type>text</type>
|
||||
<advanced>true</advanced>
|
||||
<help>This determines which local address is bound to IPv6 TCP connections used to fetch zones transferred inbound by the server.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>general.forwarders</id>
|
||||
<label>DNS Forwarders</label>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,16 @@
|
|||
<Required>Y</Required>
|
||||
<asList>Y</asList>
|
||||
</listenv6>
|
||||
<transfersource type="NetworkField">
|
||||
<Required>N</Required>
|
||||
<AddressFamily>ipv4</AddressFamily>
|
||||
<NetMaskAllowed>N</NetMaskAllowed>
|
||||
</transfersource>
|
||||
<transfersourcev6 type="NetworkField">
|
||||
<Required>N</Required>
|
||||
<AddressFamily>ipv6</AddressFamily>
|
||||
<NetMaskAllowed>N</NetMaskAllowed>
|
||||
</transfersourcev6>
|
||||
<port type="PortField">
|
||||
<default>53530</default>
|
||||
<Required>Y</Required>
|
||||
|
|
|
|||
|
|
@ -15,16 +15,24 @@ options {
|
|||
dump-file "/var/dump/named_dump.db";
|
||||
statistics-file "/var/stats/named.stats";
|
||||
|
||||
{% if helpers.exists('OPNsense.bind.general.listenv4') and OPNsense.bind.general.listenv4 != '' %} {% if helpers.exists('OPNsense.bind.general.port') and OPNsense.bind.general.port != '' %}
|
||||
{% if helpers.exists('OPNsense.bind.general.listenv4') and OPNsense.bind.general.listenv4 != '' and helpers.exists('OPNsense.bind.general.port') and OPNsense.bind.general.port != '' %}
|
||||
listen-on port {{ OPNsense.bind.general.port }} { {{ OPNsense.bind.general.listenv4.replace(',', '; ') }}; };
|
||||
{% endif %}{% endif %}
|
||||
{% if helpers.exists('OPNsense.bind.general.listenv6') and OPNsense.bind.general.listenv6 != '' %} {% if helpers.exists('OPNsense.bind.general.port') and OPNsense.bind.general.port != '' %}
|
||||
{% endif %}
|
||||
{% if helpers.exists('OPNsense.bind.general.listenv6') and OPNsense.bind.general.listenv6 != '' and helpers.exists('OPNsense.bind.general.port') and OPNsense.bind.general.port != '' %}
|
||||
listen-on-v6 port {{ OPNsense.bind.general.port }} { {{ OPNsense.bind.general.listenv6.replace(',', '; ') }}; };
|
||||
{% endif %}{% endif %}
|
||||
{% endif -%}
|
||||
|
||||
{% if helpers.exists('OPNsense.bind.general.transfersource') and OPNsense.bind.general.transfersource != '' %}
|
||||
transfer-source {{ OPNsense.bind.general.transfersource }};
|
||||
{% endif -%}
|
||||
|
||||
{% if helpers.exists('OPNsense.bind.general.transfersourcev6') and OPNsense.bind.general.transfersourcev6 != '' %}
|
||||
transfer-source-v6 {{ OPNsense.bind.general.transfersourcev6 }};
|
||||
{% endif -%}
|
||||
|
||||
{% if helpers.exists('OPNsense.bind.general.forwarders') and OPNsense.bind.general.forwarders != '' %}
|
||||
forwarders { {{ OPNsense.bind.general.forwarders.replace(',', '; ') }}; };
|
||||
{% endif %}
|
||||
{% endif -%}
|
||||
|
||||
{% if helpers.exists('OPNsense.bind.dnsbl.enabled') and OPNsense.bind.dnsbl.enabled == '1' %}
|
||||
response-policy { {% if helpers.exists('OPNsense.bind.dnsbl.type') and OPNsense.bind.dnsbl.type != '' %}zone "whitelist.localdomain"; zone "blacklist.localdomain";{% endif %}{% if helpers.exists('OPNsense.bind.dnsbl.forcesafegoogle') and OPNsense.bind.dnsbl.forcesafegoogle == '1' %}zone "rpzgoogle";{% endif %}{% if helpers.exists('OPNsense.bind.dnsbl.forcesafeduckduckgo') and OPNsense.bind.dnsbl.forcesafeduckduckgo == '1' %}zone "rpzduckduckgo";{% endif %}{% if helpers.exists('OPNsense.bind.dnsbl.forcesafeyoutube') and OPNsense.bind.dnsbl.forcesafeyoutube == '1' %}zone "rpzyoutube";{% endif %}{% if helpers.exists('OPNsense.bind.dnsbl.forcestrictbing') and OPNsense.bind.dnsbl.forcestrictbing == '1' %}zone "rpzbing";{% endif %} };
|
||||
|
|
|
|||
Loading…
Reference in a new issue