diff --git a/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/forms/dialogPeer.xml b/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/forms/dialogPeer.xml index 0f2c26151..6e498422a 100644 --- a/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/forms/dialogPeer.xml +++ b/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/forms/dialogPeer.xml @@ -61,4 +61,15 @@ text The maximum interval between requests sent to the server as a power of 2 in seconds. + + peer.nts + + checkbox + Enable NTS authentication. + + 6em + boolean + boolean + + \ No newline at end of file diff --git a/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/forms/general.xml b/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/forms/general.xml index a14a75025..ba5a0ccbe 100644 --- a/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/forms/general.xml +++ b/net/chrony/src/opnsense/mvc/app/controllers/OPNsense/Chrony/forms/general.xml @@ -31,22 +31,10 @@ true Set the networks allowed to synchronize time with this server. If this value is not set it will also not listen to the port and just synchronize the time for itself. - - general.ntsclient - - checkbox - Enable NTS in client mode. This will add another layer of security for peers when OPNsense is the client. Every server in Peers has to support NTS. - general.ntsnocert checkbox If you run NTS mode you can enable this option in order to ignore wrong time in certificates for the first check. This helps if your system starts with wrong time. - - general.fallbackpeers - - text - Set fallback peer if you use NTS and your system starts with wrong time. Best to only use this for internal trusted peers. - diff --git a/net/chrony/src/opnsense/mvc/app/models/OPNsense/Chrony/General.xml b/net/chrony/src/opnsense/mvc/app/models/OPNsense/Chrony/General.xml index 897957c01..78f763a85 100644 --- a/net/chrony/src/opnsense/mvc/app/models/OPNsense/Chrony/General.xml +++ b/net/chrony/src/opnsense/mvc/app/models/OPNsense/Chrony/General.xml @@ -7,6 +7,29 @@ 0 Y + + 1 + 15 + N + Local stratum must be within 1-15. + + + 0 + Y + + + 123 + Y + + + N + , + Y + + + 0 + Y + @@ -41,37 +64,11 @@ N maxpoll value must be between -6 and 24. + + 0 + Y + - - 1 - 15 - N - Local stratum must be within 1-15. - - - 0 - Y - - - 123 - Y - - - N - , - Y - - - 0 - Y - - - 0 - Y - - - N - diff --git a/net/chrony/src/opnsense/service/templates/OPNsense/Chrony/chrony.conf b/net/chrony/src/opnsense/service/templates/OPNsense/Chrony/chrony.conf index 74ba2732e..364f6ea59 100644 --- a/net/chrony/src/opnsense/service/templates/OPNsense/Chrony/chrony.conf +++ b/net/chrony/src/opnsense/service/templates/OPNsense/Chrony/chrony.conf @@ -13,16 +13,11 @@ allow {{ network }} {% set peers = [peers] %} {% endif %} {% for peer in peers %} -{% if peer.pool == '1' %}pool {% else %}server {% endif %}{{peer.address}}{% if peer.prefer == '1' %} prefer{% endif %}{% if peer.iburst == '1' %} iburst{% endif %}{% if peer.xleave == '1' %} xleave{% endif %}{% if peer.minpoll is defined and peer.minpoll != '' %} minpoll {{ peer.minpoll }}{% endif %}{% if peer.maxpoll is defined and peer.maxpoll != '' %} maxpoll {{ peer.maxpoll }}{% endif %} +{% if peer.pool == '1' %}pool {% else %}server {% endif %}{{peer.address}}{% if peer.prefer == '1' %} prefer{% endif %}{% if peer.iburst == '1' %} iburst{% endif %}{% if peer.xleave == '1' %} xleave{% endif %}{% if peer.minpoll is defined and peer.minpoll != '' %} minpoll {{ peer.minpoll }}{% endif %}{% if peer.maxpoll is defined and peer.maxpoll != '' %} maxpoll {{ peer.maxpoll }}{% endif %}{% if peer.nts == '1' %} nts{% endif %} {% endfor %} {% endif %} -{% if helpers.exists('OPNsense.chrony.general.fallbackpeers') and OPNsense.chrony.general.fallbackpeers != '' %} -authselectmode mix -server {{ OPNsense.chrony.general.fallbackpeers }} -{% endif %} - {% if not helpers.empty('OPNsense.chrony.general.localstratum') %} local stratum {{ OPNsense.chrony.general.localstratum }} {% if helpers.exists('OPNsense.chrony.general.orphanmode') and OPNsense.chrony.general.orphanmode == '1' %}orphan{% endif %} @@ -31,11 +26,7 @@ driftfile /var/db/chrony/drift pidfile /var/run/chrony/chronyd.pid makestep 1 3 -{% if helpers.exists('OPNsense.chrony.general.ntsclient') and OPNsense.chrony.general.ntsclient == '1' %} ntsdumpdir /var/lib/chrony -ntstrustedcerts /usr/local/etc/ssl/cert.pem -nosystemcert -{% endif %} {% if helpers.exists('OPNsense.chrony.general.ntsnocert') and OPNsense.chrony.general.ntsnocert == '1' %} nocerttimecheck 1