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 cf79c745a..9989c794a 100644 --- a/dns/ddclient/src/opnsense/service/templates/OPNsense/ddclient/ddclient.conf +++ b/dns/ddclient/src/opnsense/service/templates/OPNsense/ddclient/ddclient.conf @@ -4,9 +4,7 @@ pid=/var/run/ddclient.pid # record PID in file. {% if not helpers.empty('OPNsense.DynDNS.general.verbose') %} verbose=yes {% endif %} -{% if not helpers.empty('OPNsense.DynDNS.general.allowipv6') %} -ipv6=yes -{% endif %} + {% set accounts = [] %} {% set force_ssl = [] %} {% if helpers.exists('OPNsense.DynDNS.accounts.account') and OPNsense.DynDNS.general.backend|default('ddclient') == 'ddclient' %} @@ -23,10 +21,12 @@ ipv6=yes ssl=yes {% endif %} - {% for account in accounts %} -{% if account.checkip == 'if' %} -use=if, if={{physical_interface(account.interface)}}, \ +{% if account.checkip == 'if' %} +{% if not helpers.empty('OPNsense.DynDNS.general.allowipv6') %} +usev6=ifv6, \ +{% endif %} +usev4=ifv4, if={{physical_interface(account.interface)}}, \ {% elif account.checkip.startswith('web_') %} {% if account.interface %} use=cmd, cmd="/usr/local/opnsense/scripts/ddclient/checkip -i {{physical_interface(account.interface)}} -t {{account.force_ssl}} -s {{account.checkip[4:]}} --timeout {{account.checkip_timeout|default('10')}}",