diff --git a/dns/bind/Makefile b/dns/bind/Makefile index 8717b2f01..773381a4c 100644 --- a/dns/bind/Makefile +++ b/dns/bind/Makefile @@ -1,6 +1,5 @@ PLUGIN_NAME= bind -PLUGIN_VERSION= 1.28 -PLUGIN_REVISION= 1 +PLUGIN_VERSION= 1.29 PLUGIN_COMMENT= BIND domain name service PLUGIN_DEPENDS= bind918 PLUGIN_MAINTAINER= m.muenz@gmail.com diff --git a/dns/bind/pkg-descr b/dns/bind/pkg-descr index 500ed4c02..160e424f5 100644 --- a/dns/bind/pkg-descr +++ b/dns/bind/pkg-descr @@ -10,6 +10,11 @@ WWW: https://www.isc.org Plugin Changelog ================ +1.29 + +* Migrate General Log to Syslog +* Add Check & Preview button to Primary Zones grid + 1.28 * Add break-dnssec toggle when using filter-aaaa on IPv4/IPv6 clients (contributed by doktornotor) diff --git a/dns/bind/src/etc/inc/plugins.inc.d/bind.inc b/dns/bind/src/etc/inc/plugins.inc.d/bind.inc index 627e10808..e1d8b1b2c 100644 --- a/dns/bind/src/etc/inc/plugins.inc.d/bind.inc +++ b/dns/bind/src/etc/inc/plugins.inc.d/bind.inc @@ -99,3 +99,16 @@ function bind_configure_do($verbose) service_log("done.\n", $verbose); } + +/** + * register syslog facilities + * @return array + */ +function bind_syslog() +{ + $syslogconf = []; + + $syslogconf['bind'] = ['facility' => ['named']]; + + return $syslogconf; +} diff --git a/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/Api/GeneralController.php b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/Api/GeneralController.php index d712f7fde..cbcb0e7c2 100644 --- a/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/Api/GeneralController.php +++ b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/Api/GeneralController.php @@ -31,9 +31,32 @@ namespace OPNsense\Bind\Api; use OPNsense\Base\ApiMutableModelControllerBase; +use OPNsense\Core\Backend; class GeneralController extends ApiMutableModelControllerBase { protected static $internalModelClass = '\OPNsense\Bind\General'; protected static $internalModelName = 'general'; + + public function zonetestAction($zonename = null) + { + $response = "request error"; + if ($this->request->hasPost("zone")) { + $zonename = $this->request->getPost("zone"); + $backend = new Backend(); + $response = trim($backend->configdpRun("bind zone check", [$zonename])); + } + return array("response" => $response); + } + + public function zoneshowAction($zonename = null) + { + $response = "request error"; + if ($this->request->hasPost("zone")) { + $zonename = $this->request->getPost("zone"); + $backend = new Backend(); + $response = json_decode($backend->configdpRun("bind zone show", [$zonename]), true); + } + return $response; + } } diff --git a/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/general.xml b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/general.xml index 52929b3ef..5be009dac 100644 --- a/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/general.xml +++ b/dns/bind/src/opnsense/mvc/app/controllers/OPNsense/Bind/forms/general.xml @@ -93,7 +93,14 @@ general.logsize text - Set the amount how big a logfile can growth. + Set the amount how big a logfile can growth. For Query and Blocked logs. + + + general.general_log_level + + + dropdown + Select General Log level. Log levels are listed in the order of increasing verbosity. Setting a certain log level will cause all messages of the specified and more severe log levels to be logged. general.maxcachesize diff --git a/dns/bind/src/opnsense/mvc/app/models/OPNsense/Bind/General.xml b/dns/bind/src/opnsense/mvc/app/models/OPNsense/Bind/General.xml index 35e193df3..8ab42f3c6 100644 --- a/dns/bind/src/opnsense/mvc/app/models/OPNsense/Bind/General.xml +++ b/dns/bind/src/opnsense/mvc/app/models/OPNsense/Bind/General.xml @@ -1,7 +1,7 @@ //OPNsense/bind/general BIND configuration - 1.0.10 + 1.0.11 0 @@ -76,6 +76,20 @@ 1000 Choose a value between 1 and 1000. + + + Emergency + Alert + Critical + Error + Warning + Notice + Informational + Debug + + Y + info + 80 Y diff --git a/dns/bind/src/opnsense/mvc/app/views/OPNsense/Bind/general.volt b/dns/bind/src/opnsense/mvc/app/views/OPNsense/Bind/general.volt index e29bc6434..0649c0eb2 100644 --- a/dns/bind/src/opnsense/mvc/app/views/OPNsense/Bind/general.volt +++ b/dns/bind/src/opnsense/mvc/app/views/OPNsense/Bind/general.volt @@ -53,28 +53,30 @@
- - - - - - - - - - - - - - - - - - -
{{ lang._('Enabled') }}{{ lang._('Name') }}{{ lang._('Networks') }}{{ lang._('ID') }}{{ lang._('Commands') }}
- - -
+
+ + + + + + + + + + + + + + + + + + +
{{ lang._('Enabled') }}{{ lang._('Name') }}{{ lang._('Networks') }}{{ lang._('ID') }}{{ lang._('Commands') }}
+ + +
+

@@ -85,44 +87,46 @@

{{ lang._('Zones') }}

- - - - - - - - - - - - - - - - - - - - - - -
{{ lang._('Enabled') }}{{ lang._('Zone') }}{{ lang._('TTL') }}{{ lang._('Refresh') }}{{ lang._('Retry') }}{{ lang._('Expire') }}{{ lang._('Negative TTL') }}{{ lang._('ID') }}{{ lang._('Commands') }}
- -
+
+ + + + + + + + + + + + + + + + + + + + + + +
{{ lang._('Enabled') }}{{ lang._('Zone') }}{{ lang._('TTL') }}{{ lang._('Refresh') }}{{ lang._('Retry') }}{{ lang._('Expire') }}{{ lang._('Negative TTL') }}{{ lang._('ID') }}{{ lang._('Commands') }}
+ +
+

-
-
-

{{ lang._('Records') }}

-
- +
+

{{ lang._('Records') }}

+
+
+
- + @@ -153,27 +157,29 @@

{{ lang._('Zones') }}

-
{{ lang._('Enabled') }} {{ lang._('Zone') }} {{ lang._('Name') }} {{ lang._('Type') }}{{ lang._('Value') }}{{ lang._('Value') }} {{ lang._('ID') }} {{ lang._('Commands') }}
- - - - - - - - - - - - - - - - - -
{{ lang._('Enabled') }}{{ lang._('Zone') }}{{ lang._('Primary IPs') }}{{ lang._('ID') }}{{ lang._('Commands') }}
- -
+
+ + + + + + + + + + + + + + + + + + +
{{ lang._('Enabled') }}{{ lang._('Zone') }}{{ lang._('Primary IPs') }}{{ lang._('ID') }}{{ lang._('Commands') }}
+ +
+