diff --git a/net/chrony/Makefile b/net/chrony/Makefile index 39c87599f..0601f4f24 100644 --- a/net/chrony/Makefile +++ b/net/chrony/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= chrony -PLUGIN_VERSION= 1.0 +PLUGIN_VERSION= 1.1 PLUGIN_COMMENT= Chrony time synchronisation PLUGIN_DEPENDS= chrony PLUGIN_MAINTAINER= m.muenz@gmail.com diff --git a/net/chrony/pkg-descr b/net/chrony/pkg-descr index de8195fad..4464c2fa7 100644 --- a/net/chrony/pkg-descr +++ b/net/chrony/pkg-descr @@ -4,6 +4,10 @@ better in virtual environments. Plugin Changelog ---------------- +1.1 + +* Add NTS support + 1.0 * Allow to adjust the listening port 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 ee8d8326c..691a2b3b9 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 @@ -11,6 +11,12 @@ text Set the port chrony listen to. + + 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.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 30b99eb53..969b9fc17 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 @@ -11,6 +11,10 @@ 323 Y + + 0 + Y + 0.opnsense.pool.ntp.org Y diff --git a/net/chrony/src/opnsense/scripts/OPNsense/Chrony/setup.sh b/net/chrony/src/opnsense/scripts/OPNsense/Chrony/setup.sh index ddc03d6a0..ad9060012 100755 --- a/net/chrony/src/opnsense/scripts/OPNsense/Chrony/setup.sh +++ b/net/chrony/src/opnsense/scripts/OPNsense/Chrony/setup.sh @@ -1,5 +1,5 @@ #!/bin/sh -mkdir -p /var/db/chrony/ /var/run/chrony/ -chown -R chronyd:chronyd /var/db/chrony/ /var/run/chrony/ -chmod 750 /var/db/chrony/ /var/run/chrony/ +mkdir -p /var/db/chrony /var/lib/chrony /var/run/chrony +chown -R chronyd:chronyd /var/db/chrony /var/lib/chrony /var/run/chrony +chmod 750 /var/db/chrony /var/lib/chrony /var/run/chrony 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 38397c3a6..e800d636d 100644 --- a/net/chrony/src/opnsense/service/templates/OPNsense/Chrony/chrony.conf +++ b/net/chrony/src/opnsense/service/templates/OPNsense/Chrony/chrony.conf @@ -4,9 +4,16 @@ port {{ OPNsense.chrony.general.port }} driftfile /var/db/chrony/drift pidfile /var/run/chrony/chronyd.pid +{% if helpers.exists('OPNsense.chrony.general.ntsclient') and OPNsense.chrony.general.ntsclient == '1' %} +ntsdumpdir /var/lib/chrony +ntstrustedcerts /etc/ssl/cert.pem +nosystemcert +{% endif %} + {% if not helpers.empty('OPNsense.chrony.general.peers') %} {% for peer in OPNsense.chrony.general.peers.split(',') %} -server {{ peer }} iburst +server {{ peer }} iburst {% if helpers.exists('OPNsense.chrony.general.ntsclient') and OPNsense.chrony.general.ntsclient == '1' %}nts{% endif %} + {% endfor %} {% endif %}