dns/bind: correct use of "any" address, small tweaks; closes #3417

This commit is contained in:
Franco Fichtner
2023-05-08 09:09:53 +02:00
parent 6737b8c62c
commit 51d6c762f5
5 changed files with 37 additions and 41 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
PLUGIN_NAME= bind
PLUGIN_VERSION= 1.26
PLUGIN_REVISION= 4
PLUGIN_REVISION= 5
PLUGIN_COMMENT= BIND domain name service
PLUGIN_DEPENDS= bind918
PLUGIN_MAINTAINER= m.muenz@gmail.com
+1 -1
View File
@@ -15,7 +15,7 @@ Plugin Changelog
* Allow multiple ACLs to be selected for Transfers/Queries (contributed by Robbert Rijkse)
* Rename Master/Slave to Primary/Secondary (contributed by Robbert Rijkse)
* Add necessary hooks to allow the plugin to be used as a standalone core DNS server
* Changed default listening addresses to 0.0.0.0/:: for new users
* Changed default listening addresses to 0.0.0.0/:: for new users and interally translate these to "any"
1.25
@@ -83,7 +83,7 @@
</field>
<field>
<id>general.filteraaaaacl</id>
<label>ACl for filter-aaaa</label>
<label>ACL for filter-aaaa</label>
<style>tokenize</style>
<type>select_multiple</type>
<allownew>true</allownew>
@@ -1,31 +1,30 @@
{#
OPNsense® is Copyright © 2014 2019 by Deciso B.V.
This file is Copyright © 2018 - 2019 by Michael Muenz <m.muenz@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
#}
#
# Copyright (c) 2014-2029 Deciso B.V.
# Copyright (c) 2018-2019 Michael Muenz <m.muenz@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#}
<!-- Navigation bar -->
<ul class="nav nav-tabs" data-tabs="tabs" id="maintabs">
@@ -40,8 +39,7 @@ POSSIBILITY OF SUCH DAMAGE.
<div id="general" class="tab-pane fade in active">
<div class="content-box" style="padding-bottom: 1.5em;">
{{ partial("layout_partials/base_form",['fields':generalForm,'id':'frm_general_settings'])}}
<div class="col-md-12">
<hr />
<div class="col-md-12 __mt">
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b> <i id="saveAct_progress"></i></button>
</div>
</div>
@@ -49,8 +47,7 @@ POSSIBILITY OF SUCH DAMAGE.
<div id="dnsbl" class="tab-pane fade in">
<div class="content-box" style="padding-bottom: 1.5em;">
{{ partial("layout_partials/base_form",['fields':dnsblForm,'id':'frm_dnsbl_settings'])}}
<div class="col-md-12">
<hr />
<div class="col-md-12 __mt">
<button class="btn btn-primary" id="saveAct_dnsbl" type="button"><b>{{ lang._('Save') }}</b> <i id="saveAct_dnsbl_progress"></i></button>
</div>
</div>
@@ -182,7 +179,6 @@ POSSIBILITY OF SUCH DAMAGE.
<div id="ChangeMessage" class="alert alert-info" style="display: none" role="alert">
{{ lang._('After changing settings, please remember to apply them with the button below') }}
</div>
<hr />
<button class="btn btn-primary saveAct_domain" type="button"><b>{{ lang._('Save') }}</b> <i class="saveAct_domain_progress"></i></button>
<br /><br />
</div>
@@ -15,12 +15,12 @@ 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 != '' 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 %}
{% 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 -%}
{% for listenv4 in OPNsense.bind.general.listenv4.split(',') %}
listen-on port {{ OPNsense.bind.general.port }} { {% if listenv4 == '0.0.0.0' %}any{% else %}{{ listenv4 }}{% endif %}; };
{% endfor %}
{% for listenv6 in OPNsense.bind.general.listenv6.split(',') %}
listen-on-v6 port {{ OPNsense.bind.general.port }} { {% if listenv6 == '::' %}any{% else %}{{ listenv6 }}{% endif %}; };
{% endfor %}
{% if helpers.exists('OPNsense.bind.general.querysource') and OPNsense.bind.general.querysource != '' %}
query-source {{ OPNsense.bind.general.querysource }};