diff --git a/Makefile b/Makefile index b67aff74f..288b79dc1 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,6 @@ CORE_HASH= ${CORE_COMMIT:C/^.*-//1} CORE_ABI?= 17.1 CORE_ARCH?= ${ARCH} -CORE_BIND?= 911 CORE_OPENVPN?= # empty for version 2.4 CORE_PHP?= 71 CORE_PY?= 27 @@ -73,7 +72,6 @@ CORE_WWW?= https://opnsense.org/ CORE_DEPENDS_amd64?= beep bsdinstaller CORE_DEPENDS_i386?= ${CORE_DEPENDS_amd64} CORE_DEPENDS?= apinger \ - bind${CORE_BIND} \ ca_root_nss \ choparp \ cpustats \ diff --git a/plist b/plist index aa32b59cd..7e0363eb4 100644 --- a/plist +++ b/plist @@ -47,7 +47,6 @@ /usr/local/etc/inc/plugins.inc.d/openvpn/tls-verify.php /usr/local/etc/inc/plugins.inc.d/openvpn/wizard.inc /usr/local/etc/inc/plugins.inc.d/pf.inc -/usr/local/etc/inc/plugins.inc.d/rfc2136.inc /usr/local/etc/inc/plugins.inc.d/squid.inc /usr/local/etc/inc/plugins.inc.d/squid/auth-user.php /usr/local/etc/inc/plugins.inc.d/suricata.inc @@ -127,7 +126,6 @@ /usr/local/etc/rc.reload_interfaces /usr/local/etc/rc.resolv_conf_generate /usr/local/etc/rc.restart_webgui -/usr/local/etc/rc.rfc2136 /usr/local/etc/rc.shutdown /usr/local/etc/rc.sshd /usr/local/etc/rc.syshook @@ -470,8 +468,6 @@ /usr/local/opnsense/mvc/app/models/OPNsense/Proxy/Migrations/M1_0_0.php /usr/local/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.php /usr/local/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml -/usr/local/opnsense/mvc/app/models/OPNsense/RFC2136/ACL/ACL.xml -/usr/local/opnsense/mvc/app/models/OPNsense/RFC2136/Menu/Menu.xml /usr/local/opnsense/mvc/app/models/OPNsense/TrafficShaper/ACL/ACL.xml /usr/local/opnsense/mvc/app/models/OPNsense/TrafficShaper/Menu/Menu.xml /usr/local/opnsense/mvc/app/models/OPNsense/TrafficShaper/Migrations/M1_0_0.php @@ -657,7 +653,6 @@ /usr/local/opnsense/service/conf/actions.d/actions_openssh.conf /usr/local/opnsense/service/conf/actions.d/actions_openvpn.conf /usr/local/opnsense/service/conf/actions.d/actions_proxy.conf -/usr/local/opnsense/service/conf/actions.d/actions_rfc2136.conf /usr/local/opnsense/service/conf/actions.d/actions_routedns.conf /usr/local/opnsense/service/conf/actions.d/actions_system.conf /usr/local/opnsense/service/conf/actions.d/actions_systemhealth.conf @@ -1071,8 +1066,6 @@ /usr/local/www/services_ntpd_gps.php /usr/local/www/services_ntpd_pps.php /usr/local/www/services_opendns.php -/usr/local/www/services_rfc2136.php -/usr/local/www/services_rfc2136_edit.php /usr/local/www/services_router_advertisements.php /usr/local/www/services_unbound.php /usr/local/www/services_unbound_acls.php @@ -1144,7 +1137,6 @@ /usr/local/www/widgets/include/log.inc /usr/local/www/widgets/include/ntp_status.inc /usr/local/www/widgets/include/openvpn.inc -/usr/local/www/widgets/include/rfc2136.inc /usr/local/www/widgets/include/services_status.inc /usr/local/www/widgets/include/system_log.inc /usr/local/www/widgets/include/thermal_sensors.inc @@ -1159,7 +1151,6 @@ /usr/local/www/widgets/widgets/ntp_status.widget.php /usr/local/www/widgets/widgets/openvpn.widget.php /usr/local/www/widgets/widgets/picture.widget.php -/usr/local/www/widgets/widgets/rfc2136.widget.php /usr/local/www/widgets/widgets/rss.widget.php /usr/local/www/widgets/widgets/services_status.widget.php /usr/local/www/widgets/widgets/system_information.widget.php diff --git a/src/etc/inc/plugins.inc.d/rfc2136.inc b/src/etc/inc/plugins.inc.d/rfc2136.inc deleted file mode 100644 index ebfd12eb3..000000000 --- a/src/etc/inc/plugins.inc.d/rfc2136.inc +++ /dev/null @@ -1,248 +0,0 @@ - - Copyright (C) 2010 Ermal Luci - Copyright (C) 2005-2006 Colin Smith - Copyright (C) 2003-2004 Manuel Kasper - 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. -*/ - -function rfc2136_configure() -{ - return array( - 'bootup' => array('rfc2136_configure_do'), - 'local' => array('rfc2136_configure_do'), - 'newwanip' => array('rfc2136_configure_do:2'), - ); -} - -function rfc2136_enabled() -{ - global $config; - - if (isset($config['dnsupdates']['dnsupdate'])) { - foreach ($config['dnsupdates']['dnsupdate'] as $dnsupdate) { - if (isset($dnsupdate['enable'])) { - return true; - } - } - } - - return false; -} - -function rfc2136_services() -{ - global $config; - - $services = array(); - - if (rfc2136_enabled()) { - $services[] = array( - 'description' => gettext('RFC 2136'), - 'configd' => array( - 'restart' => array('rfc2136 reload'), - ), - 'nocheck' => true, - 'name' => 'rfc2136', - ); - } - - return $services; -} - -function rfc2136_cron() -{ - $jobs = array(); - - if (rfc2136_enabled()) { - $jobs[]['autocron'] = array('/usr/local/etc/rc.rfc2136', '16', '1'); - } - - return $jobs; -} - -function rfc2136_cache_file($dnsupdate, $ipver = 4) -{ - $ipver = $ipver == 6 ? '_v6' : ''; - - return "/var/cache/rfc2136_{$dnsupdate['interface']}_{$dnsupdate['host']}_{$dnsupdate['server']}{$ipver}.cache"; -} - -function rfc2136_configure_do($verbose = false, $int = '', $updatehost = '', $forced = false) -{ - global $config; - - if (!rfc2136_enabled()) { - return; - } - - $notify_text = ''; - - if ($verbose) { - echo 'Configuring RFC 2136 clients...'; - flush(); - } - - foreach ($config['dnsupdates']['dnsupdate'] as $i => $dnsupdate) { - if (!isset($dnsupdate['enable'])) { - continue; - } elseif (!empty($int) && $int != $dnsupdate['interface']) { - continue; - } elseif (!empty($updatehost) && ($updatehost != $dnsupdate['host'])) { - continue; - } - - $currentTime = time(); - - $keyname = $dnsupdate['keyname']; - /* trailing dot */ - if (substr($keyname, -1) != ".") { - $keyname .= "."; - } - - $hostname = $dnsupdate['host']; - /* trailing dot */ - if (substr($hostname, -1) != ".") { - $hostname .= "."; - } - - /* write private key file - this is dumb - public and private keys are the same for HMAC-MD5, - but nsupdate insists on having both */ - $fd = fopen("/var/etc/K{$i}{$keyname}+157+00000.private", "w"); - $privkey = << $maxCacheAgeSecs) || $forced) { - $upinst .= "update delete {$dnsupdate['host']}. A\n"; - $upinst .= "update add {$dnsupdate['host']}. {$dnsupdate['ttl']} A {$wanip}\n"; - $notify_text .= sprintf(gettext('Dynamic DNS updated IP Address (A) for %s on %s to %s'), $dnsupdate['host'], strtoupper($dnsupdate['interface']), $wanip) . "\n"; - @file_put_contents($cacheFile, "{$wanip}|{$currentTime}"); - log_error("Dynamic DNS: updating cache file {$cacheFile}: {$wanip}"); - $need_update = true; - } else { - log_error("Dynamic DNS: Not updating {$dnsupdate['host']} A record because the IP address has not changed."); - } - } else { - @unlink($cacheFile); - } - } - - if (empty($dnsupdate['recordtype']) || $dnsupdate['recordtype'] == 'AAAA') { - $cacheFile6 = rfc2136_cache_file($dnsupdate, 6); - if (file_exists($cacheFile6)) { - list($cachedipv6, $cacheTimev6) = explode('|', file_get_contents($cacheFile6)); - } else { - list($cachedipv6, $cacheTimev6) = array('', ''); - } - if (isset($dnsupdate['usepublicip'])) { - $wanipv6 = get_dyndns_ip($dnsupdate['interface'], 6); - } else { - $wanipv6 = get_interface_ipv6($dnsupdate['interface']); - } - if (is_ipaddrv6($wanipv6)) { - if (($wanipv6 != $cachedipv6) || (($currentTime - $cacheTimev6) > $maxCacheAgeSecs) || $forced) { - $upinst .= "update delete {$dnsupdate['host']}. AAAA\n"; - $upinst .= "update add {$dnsupdate['host']}. {$dnsupdate['ttl']} AAAA {$wanipv6}\n"; - $notify_text .= sprintf(gettext('Dynamic DNS updated IPv6 Address (AAAA) for %s on %s to %s'), $dnsupdate['host'], strtoupper($dnsupdate['interface']), $wanipv6) . "\n"; - @file_put_contents($cacheFile6, "{$wanipv6}|{$currentTime}"); - log_error("Dynamic DNS: updating cache file {$cacheFile6}: {$wanipv6}"); - $need_update = true; - } else { - log_error("Dynamic DNS: Not updating {$dnsupdate['host']} AAAA record because the IPv6 address has not changed."); - } - } else { - @unlink($cacheFile6); - } - } - - $upinst .= "\n"; /* mind that trailing newline! */ - - if ($need_update) { - @file_put_contents("/var/etc/nsupdatecmds{$i}", $upinst); - unset($upinst); - /* invoke nsupdate */ - $cmd = "/usr/local/bin/nsupdate -k /var/etc/K{$i}{$keyname}+157+00000.key"; - if (isset($dnsupdate['usetcp'])) - $cmd .= " -v"; - $cmd .= " /var/etc/nsupdatecmds{$i}"; - mwexec_bg($cmd); - unset($cmd); - } - } - - if (!empty($notify_text)) { - notify_all_remote($notify_text); - } - - if ($verbose) { - echo "done.\n"; - } -} diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc index e363e4d39..d04648064 100644 --- a/src/etc/inc/services.inc +++ b/src/etc/inc/services.inc @@ -47,7 +47,6 @@ require_once('plugins.inc.d/dnsmasq.inc'); require_once('plugins.inc.d/dyndns.inc'); require_once('plugins.inc.d/ipsec.inc'); require_once('plugins.inc.d/openvpn.inc'); -require_once('plugins.inc.d/rfc2136.inc'); require_once('plugins.inc.d/openssh.inc'); require_once('plugins.inc.d/unbound.inc'); diff --git a/src/etc/rc.rfc2136 b/src/etc/rc.rfc2136 deleted file mode 100755 index e86e4d25a..000000000 --- a/src/etc/rc.rfc2136 +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/local/bin/php - - - Services: RFC 2136 clients - - services_rfc2136.php* - services_rfc2136_edit.php* - - - diff --git a/src/opnsense/mvc/app/models/OPNsense/RFC2136/Menu/Menu.xml b/src/opnsense/mvc/app/models/OPNsense/RFC2136/Menu/Menu.xml deleted file mode 100644 index 531e449ad..000000000 --- a/src/opnsense/mvc/app/models/OPNsense/RFC2136/Menu/Menu.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/opnsense/service/conf/actions.d/actions_rfc2136.conf b/src/opnsense/service/conf/actions.d/actions_rfc2136.conf deleted file mode 100644 index 10d4ea5f0..000000000 --- a/src/opnsense/service/conf/actions.d/actions_rfc2136.conf +++ /dev/null @@ -1,6 +0,0 @@ -[reload] -command:/usr/local/etc/rc.rfc2136 -description:RFC 2136 Update -parameters:%s -type:script -message:updating rfc2136 %s diff --git a/src/www/services_rfc2136.php b/src/www/services_rfc2136.php deleted file mode 100644 index f0587da89..000000000 --- a/src/www/services_rfc2136.php +++ /dev/null @@ -1,212 +0,0 @@ - gettext('Add'), 'href' => 'services_rfc2136_edit.php'), -); - -?> - - - - -
-
-
- 0) print_input_errors($input_errors); ?> -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- "> - "> - - - - $cached_ip) { - echo ""; - } else { - echo ""; - } - echo htmlspecialchars($cached_ip); - echo ""; - } else { - echo 'IPv4: ' . gettext('N/A'); - } - echo "
"; - $filename6 = rfc2136_cache_file($rfc2136, 6); - if (file_exists($filename6) && !empty($rfc2136['enable']) && (empty($rfc2136['recordtype']) || $rfc2136['recordtype'] == 'AAAA')) { - echo "IPv6: "; - if (isset($rfc2136['usepublicip'])) { - $ipaddr = get_dyndns_ip($rfc2136['interface'], 6); - } else { - $ipaddr = get_interface_ipv6($rfc2136['interface']); - } - $cached_ip_s = explode("|", file_get_contents($filename6)); - $cached_ip = $cached_ip_s[0]; - if ($ipaddr <> $cached_ip) { - echo ""; - } else { - echo ""; - } - echo htmlspecialchars($cached_ip); - echo ""; - } else { - echo 'IPv6: ' . gettext('N/A'); - }?> -
- - - - -
-
-
-
-
-
-
-
- diff --git a/src/www/services_rfc2136_edit.php b/src/www/services_rfc2136_edit.php deleted file mode 100644 index 68fcf22a6..000000000 --- a/src/www/services_rfc2136_edit.php +++ /dev/null @@ -1,273 +0,0 @@ - - - -
-
-
- 0) print_input_errors($input_errors); ?> - -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- /> -
- -
- - -
- />   - />   - /> - -
() - -
- - -
- />   - />   - /> -
- - -
- -
- " /> - -
- " /> - -
- -
  - - - - - - -
- ', '');?> -
-
-
-
-
-
-
-
- diff --git a/src/www/widgets/include/rfc2136.inc b/src/www/widgets/include/rfc2136.inc deleted file mode 100644 index c143db6dd..000000000 --- a/src/www/widgets/include/rfc2136.inc +++ /dev/null @@ -1,4 +0,0 @@ - - Copyright (C) 2014-2016 Deciso B.V. - Copyright (C) 2008 Ermal Luci - Copyright (C) 2013 Stanley P. Miller \ stan-qaz - 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. -*/ - -require_once("guiconfig.inc"); -require_once("widgets/include/rfc2136.inc"); -require_once("services.inc"); -require_once("interfaces.inc"); -require_once("plugins.inc.d/rfc2136.inc"); - -if (!isset($config['dnsupdates']['dnsupdate'])) { - $config['dnsupdates']['dnsupdate'] = array(); -} - -$a_rfc2136 = &$config['dnsupdates']['dnsupdate']; - -if (!empty($_REQUEST['getrfc2136status'])) { - $first_entry = true; - foreach ($a_rfc2136 as $rfc2136) { - if ($first_entry) { - $first_entry = false; - } else { - // Put a vertical bar delimiter between the echoed HTML for each entry processed. - echo '|'; - } - - $filename = rfc2136_cache_file($rfc2136, 4); - $fdata = ''; - if (!empty($rfc2136['enable']) && (empty($rfc2136['recordtype']) || $rfc2136['recordtype'] == 'A') && file_exists($filename)) { - $ipaddr = get_dyndns_ip($rfc2136['interface'], 4); - $fdata = @file_get_contents($filename); - } - - $filename_v6 = rfc2136_cache_file($rfc2136, 6); - $fdata6 = ''; - if (!empty($rfc2136['enable']) && (empty($rfc2136['recordtype']) || $rfc2136['recordtype'] == 'AAAA') && file_exists($filename_v6)) { - $ipv6addr = get_dyndns_ip($rfc2136['interface'], 6); - $fdata6 = @file_get_contents($filename_v6); - } - - if (!empty($fdata)) { - $cached_ip_s = explode('|', $fdata); - $cached_ip = $cached_ip_s[0]; - echo sprintf( - 'IPv4: %s', - $ipaddr != $cached_ip ? 'red' : 'green', - htmlspecialchars($cached_ip) - ); - } else { - echo 'IPv4: ' . gettext('N/A'); - } - - echo '
'; - - if (!empty($fdata6)) { - $cached_ipv6_s = explode('|', $fdata6); - $cached_ipv6 = $cached_ipv6_s[0]; - echo sprintf( - 'IPv6: %s', - $ipv6addr != $cached_ipv6 ? 'red' : 'green', - htmlspecialchars($cached_ipv6) - ); - } else { - echo 'IPv6: ' . gettext('N/A'); - } - } - exit; -} - -?> - - - - - - - - - - - - $rfc2136) :?> - - - - - - - - -
> - $ifdesc) { - if ($rfc2136['interface'] == $if) { - echo "{$ifdesc}"; - break; - } - } - foreach ($groupslist as $if => $group) { - if ($rfc2136['interface'] == $if) { - echo "{$if}"; - break; - } - }?> - > - - > - - > -
- -
-
-