diff --git a/dns/ddclient/src/opnsense/mvc/app/controllers/OPNsense/DynDNS/forms/dialogAccount.xml b/dns/ddclient/src/opnsense/mvc/app/controllers/OPNsense/DynDNS/forms/dialogAccount.xml index 9a946d140..2ee8e7271 100644 --- a/dns/ddclient/src/opnsense/mvc/app/controllers/OPNsense/DynDNS/forms/dialogAccount.xml +++ b/dns/ddclient/src/opnsense/mvc/app/controllers/OPNsense/DynDNS/forms/dialogAccount.xml @@ -23,6 +23,13 @@ password Password associated with this account + + account.wildcard + + checkbox + + add a DNS wildcard CNAME record that points to the configured host. + account.hostnames diff --git a/dns/ddclient/src/opnsense/mvc/app/controllers/OPNsense/DynDNS/forms/settings.xml b/dns/ddclient/src/opnsense/mvc/app/controllers/OPNsense/DynDNS/forms/settings.xml index 38fadde58..fb0f9a428 100644 --- a/dns/ddclient/src/opnsense/mvc/app/controllers/OPNsense/DynDNS/forms/settings.xml +++ b/dns/ddclient/src/opnsense/mvc/app/controllers/OPNsense/DynDNS/forms/settings.xml @@ -5,6 +5,19 @@ checkbox Enable ddclient + + ddclient.general.verbose + + checkbox + true + Enable verbose logging + + + ddclient.general.daemon_delay + + text + Interval in seconds to check for address changes + ddclient.general.checkip diff --git a/dns/ddclient/src/opnsense/mvc/app/models/OPNsense/DynDNS/DynDNS.xml b/dns/ddclient/src/opnsense/mvc/app/models/OPNsense/DynDNS/DynDNS.xml index b9896be22..e9bf53869 100644 --- a/dns/ddclient/src/opnsense/mvc/app/models/OPNsense/DynDNS/DynDNS.xml +++ b/dns/ddclient/src/opnsense/mvc/app/models/OPNsense/DynDNS/DynDNS.xml @@ -10,6 +10,16 @@ 1 Y + + 0 + Y + + + 300 + Y + 1 + 86400 + Y web_dyndns @@ -28,7 +38,7 @@ noip-ipv4 noip-ipv6 nsupdate.info-ipv4 - nsupdate.info-ipv4 + nsupdate.info-ipv6 zoneedit @@ -43,9 +53,18 @@ Y A service type is required. + Changeip + DynDNS.com + DnsPark + DslReports + DuckDNS + EasyDNS + Google + NameCheap Noip - nsupdate (IPv4) - nsupdate (IPv6) + nsupdate.info (IPv4) + nsupdate.info (IPv6) + Zoneedit @@ -63,6 +82,10 @@ Y , + + 0 + Y + N /^([\t\n\v\f\r 0-9a-zA-Z.,_\x{00A0}-\x{FFFF}]){1,255}$/u diff --git a/dns/ddclient/src/opnsense/mvc/app/models/OPNsense/DynDNS/Menu/Menu.xml b/dns/ddclient/src/opnsense/mvc/app/models/OPNsense/DynDNS/Menu/Menu.xml index e2ed79307..0834a4ab7 100644 --- a/dns/ddclient/src/opnsense/mvc/app/models/OPNsense/DynDNS/Menu/Menu.xml +++ b/dns/ddclient/src/opnsense/mvc/app/models/OPNsense/DynDNS/Menu/Menu.xml @@ -1,7 +1,7 @@ - + diff --git a/dns/ddclient/src/opnsense/mvc/app/views/OPNsense/DynDNS/index.volt b/dns/ddclient/src/opnsense/mvc/app/views/OPNsense/DynDNS/index.volt index 9a40d6f8a..4355f4144 100644 --- a/dns/ddclient/src/opnsense/mvc/app/views/OPNsense/DynDNS/index.volt +++ b/dns/ddclient/src/opnsense/mvc/app/views/OPNsense/DynDNS/index.volt @@ -54,6 +54,22 @@ POSSIBILITY OF SUCH DAMAGE. return dfObj; } }); + $('#DialogAccount').on('shown.bs.modal', function (e) { + $("#account\\.service").change(function(){ + let service = $(this).val(); + $(".optional_setting").each(function(){ + let this_item = $(this); + if (this_item.hasClass("service_"+service)) { + this_item.prop( "disabled", false ); + this_item.closest("tr").show(); + } else { + this_item.closest("tr").hide(); + this_item.prop( "disabled", true ); + } + }); + }); + $("#account\\.service").change(); + }); }); diff --git a/dns/ddclient/src/opnsense/service/templates/OPNsense/ddclient/ddclient.conf b/dns/ddclient/src/opnsense/service/templates/OPNsense/ddclient/ddclient.conf index 3e5b2baaf..83ddb549d 100644 --- a/dns/ddclient/src/opnsense/service/templates/OPNsense/ddclient/ddclient.conf +++ b/dns/ddclient/src/opnsense/service/templates/OPNsense/ddclient/ddclient.conf @@ -1,6 +1,9 @@ -daemon=300 # check every 300 seconds +daemon={{OPNsense.DynDNS.general.daemon_delay|default('300')}} syslog=yes # log update msgs to syslog pid=/var/run/ddclient.pid # record PID in file. +{% if not helpers.empty('OPNsense.DynDNS.general.verbose') %} +verbose=yes +{% endif %} # # setup how we expect to retrieve an IP address @@ -43,10 +46,7 @@ use=web, web=http://dynamic.zoneedit.com/checkip.html {% if helpers.exists('OPNsense.DynDNS.accounts.account') %} {% for account in helpers.toList('OPNsense.DynDNS.accounts.account') %} {% if account.enabled|default('0') == '1' %} -{% if account.service == 'noip' %} -protocol=noip -ssl=yes -{% elif account.service == 'nsupdatev4' %} +{% if account.service == 'nsupdatev4' %} protocol=dyndns2 ssl=yes server=ipv4.nsupdate.info @@ -54,7 +54,13 @@ server=ipv4.nsupdate.info protocol=dyndns2 ssl=yes server=ipv6.nsupdate.info +{% else %} +protocol={{account.service}} +ssl=yes {% endif %} +{% if account.wildcard|default('0') == '1' %} +wildcard=yes +{% endif} login={{account.username}} password={{account.password}} {{account.hostnames}}