Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
20.7 Legacy Series
»
How to switch from ntpd to chrony? [SOLVED]
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to switch from ntpd to chrony? [SOLVED] (Read 10478 times)
FarmServer
Newbie
Posts: 29
Karma: 3
How to switch from ntpd to chrony? [SOLVED]
«
on:
January 26, 2021, 02:03:25 am »
I currently have the opnsense ntpd setup to provide time sync for all connected clients and to force any client trying to use its own ntp address to sync with the opnsense ntp.
I would like to do a similar thing using chrony so that I can also take advantage of NTS since that is now available.
This is how I configured it
enabled: true
listen port: 123 (it defaulted to 323 for some reason)
nts client support: true
ntp peers: time.cloudflare.com
allowed networks: 192.168.1.1 , 192.168.2.1 (my subnets)
Then I stopped the ntp service, there seemed to be no way to explicitly disable ntpd in the gui.
Is this set up correct?
how can I disable ntpd in opnsense? I assume it will just restart after a reboot.
«
Last Edit: January 29, 2021, 03:04:36 am by FarmServer
»
Logged
FarmServer
Newbie
Posts: 29
Karma: 3
Re: How to switch from ntpd to chrony?
«
Reply #1 on:
January 26, 2021, 02:20:11 am »
meh, it took a while but the time did not resync for my client. So it must be misconfigured the way I had it setup
Logged
mimugmail
Hero Member
Posts: 6766
Karma: 494
Re: How to switch from ntpd to chrony?
«
Reply #2 on:
January 26, 2021, 09:17:34 am »
Allowed networks is 192.168.1.0/24 and 2.0/24 from syntax.
In the normal ntpd just remove all peers, then the service is stopped, also at boot. Then restart chrony and you are good.
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
koushun
Jr. Member
Posts: 95
Karma: 9
Digital pimp hard at work.
Re: How to switch from ntpd to chrony?
«
Reply #3 on:
January 27, 2021, 01:23:29 am »
SSH in to your fw.
Check connectivity with these commands:
chronyc sources
chronyc sourcestats
chronyc tracking
See if you are connected securely with NTS:
sudo chronyc -N authdata
If you disable ntpd, which you should if you want Chrony to listen to port 123, remember to do something to make the fw synchronize itself (cron job + ntpdate)
Some more information can be found here:
https://github.com/opnsense/plugins/issues/2162
https://github.com/opnsense/core/issues/2012
Try to manually, on a client on a LAN, synchronize time from the OPNsense fw.
Logged
Running OPNsense through Proxmox
4 x Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz (1 Socket)
24 GB RAM
FarmServer
Newbie
Posts: 29
Karma: 3
Re: How to switch from ntpd to chrony?
«
Reply #4 on:
January 27, 2021, 02:55:29 pm »
Thanks, ill get on the suggestions. I goofed not specifying the subnets correctly.
Logged
FarmServer
Newbie
Posts: 29
Karma: 3
Re: How to switch from ntpd to chrony?
«
Reply #5 on:
January 28, 2021, 02:11:17 am »
I think I got it working, hope this helps anyone else.
The firewall time seemed to update itself. But since it was suggested to add a cron job I just did this:
crontab -e
which opened up the cron jobs already enabled in opnsense. Then I added
* 3 * * * (ntpdate -v -u 192.168.1.1) > /dev/null
So hopefully this means it will update tomorrow morning at 3am. And every day after.
Logged
koushun
Jr. Member
Posts: 95
Karma: 9
Digital pimp hard at work.
Re: How to switch from ntpd to chrony?
«
Reply #6 on:
January 29, 2021, 12:22:02 am »
Nice.
Maybe mark this post as [SOLVED]?
I'm new to this forum- but I have browsed through every page of forum posts to check where I might be of help- and there were many posts which were solved, but not marked as such.
Should be a rule in the forum guidelines about this.
koushun
Logged
Running OPNsense through Proxmox
4 x Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz (1 Socket)
24 GB RAM
mimugmail
Hero Member
Posts: 6766
Karma: 494
Re: How to switch from ntpd to chrony? [SOLVED]
«
Reply #7 on:
January 29, 2021, 07:52:42 am »
I will add your ideas to the UI the next days/weeks
https://github.com/opnsense/plugins/issues/2209
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
mimugmail
Hero Member
Posts: 6766
Karma: 494
Re: How to switch from ntpd to chrony? [SOLVED]
«
Reply #8 on:
February 06, 2021, 06:56:31 pm »
I added couple of diagnostics tabs:
https://github.com/opnsense/plugins/pull/2220
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
koushun
Jr. Member
Posts: 95
Karma: 9
Digital pimp hard at work.
Re: How to switch from ntpd to chrony? [SOLVED]
«
Reply #9 on:
February 09, 2021, 11:35:35 pm »
mimugmail
Great job! Looking forward to check this one out.
How about adding
Code:
[Select]
chronyc clients
https://github.com/opnsense/plugins/issues/2162#issuecomment-757388998
..And what about the cron job workaround for synchronizing the firewall itself when Network Time is disabled?
«
Last Edit: February 09, 2021, 11:43:05 pm by koushun
»
Logged
Running OPNsense through Proxmox
4 x Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz (1 Socket)
24 GB RAM
mimugmail
Hero Member
Posts: 6766
Karma: 494
Re: How to switch from ntpd to chrony? [SOLVED]
«
Reply #10 on:
February 11, 2021, 09:38:42 pm »
Something like this:
root@OPNsense:~ # date
Thu Feb 11 22:34:15 CET 2021
root@OPNsense:~ # chronyc -a makestep
200 OK
root@OPNsense:~ # date
Thu Feb 11 21:37:56 CET 2021
https://stackoverflow.com/questions/49730407/how-to-resynchronize-with-chrony
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
20.7 Legacy Series
»
How to switch from ntpd to chrony? [SOLVED]