mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
dns/bind: same same but bind
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
PLUGIN_NAME= bind
|
||||
PLUGIN_VERSION= 1.26
|
||||
PLUGIN_REVISION= 2
|
||||
PLUGIN_REVISION= 3
|
||||
PLUGIN_COMMENT= BIND domain name service
|
||||
PLUGIN_DEPENDS= bind918
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
|
||||
@@ -15,6 +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
|
||||
|
||||
1.25
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
/*
|
||||
* Copyright (C) 2018 Michael Muenz <m.muenz@gmail.com>
|
||||
* Copyright (C) 2023 Franco Fichtner <franco@opnsense.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -49,21 +50,21 @@ function bind_services()
|
||||
|
||||
$model = new \OPNsense\Bind\General();
|
||||
|
||||
/* DNS service is eligable for core use when both 127.0.0.1 and ::1 are set */
|
||||
$localhost4 = false;
|
||||
$localhost6 = false;
|
||||
/* DNS service is eligable for core use when both 0.0.0.0 and :: are set */
|
||||
$any4 = false;
|
||||
$any6 = false;
|
||||
|
||||
foreach (explode(',', (string)$model->listenv4) as $addr) {
|
||||
$localhost4 |= $addr === '127.0.0.1';
|
||||
$any4 |= $addr === '0.0.0.0';
|
||||
}
|
||||
|
||||
foreach (explode(',', (string)$model->listenv6) as $addr) {
|
||||
$localhost6 |= $addr === '::1';
|
||||
$any6 |= $addr === '::';
|
||||
}
|
||||
|
||||
$services[] = [
|
||||
/* the port may still be something other than 53, but it's safe to register a conflict for it */
|
||||
'dns_ports' => ($localhost4 && $localhost6 ? [(string)$model->port] : []),
|
||||
'dns_ports' => ($any4 && $any6 ? [(string)$model->port] : []),
|
||||
'description' => gettext('BIND Daemon'),
|
||||
'configd' => [
|
||||
'restart' => ['bind restart'],
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
<Required>Y</Required>
|
||||
</enablerpz>
|
||||
<listenv4 type="NetworkField">
|
||||
<default>127.0.0.1</default>
|
||||
<default>0.0.0.0</default>
|
||||
<FieldSeparator>,</FieldSeparator>
|
||||
<Required>Y</Required>
|
||||
<asList>Y</asList>
|
||||
</listenv4>
|
||||
<listenv6 type="NetworkField">
|
||||
<default>::1</default>
|
||||
<default>::</default>
|
||||
<FieldSeparator>,</FieldSeparator>
|
||||
<Required>Y</Required>
|
||||
<asList>Y</asList>
|
||||
@@ -149,7 +149,7 @@
|
||||
<ValidationMessage>Choose a value between 1 and 1000.</ValidationMessage>
|
||||
</ratelimitcount>
|
||||
<ratelimitexcept type="NetworkField">
|
||||
<default>127.0.0.1,::1</default>
|
||||
<default>0.0.0.0,::</default>
|
||||
<FieldSeparator>,</FieldSeparator>
|
||||
<Required>Y</Required>
|
||||
<asList>Y</asList>
|
||||
|
||||
Reference in New Issue
Block a user