Difference between revisions of "NTP"

From UVOO Tech Wiki
Jump to navigation Jump to search
 
Line 30: Line 30:
  
 
https://www.digitalocean.com/community/tutorials/how-to-configure-ntp-for-use-in-the-ntp-pool-project-on-ubuntu-16-04
 
https://www.digitalocean.com/community/tutorials/how-to-configure-ntp-for-use-in-the-ntp-pool-project-on-ubuntu-16-04
 +
 +
 +
resync after drift
 +
```
 +
systemctl stop ntp
 +
sudo ntpd -gq
 +
systmectl start ntp
 +
```

Latest revision as of 17:56, 14 November 2021

Links

https://www.cyberciti.biz/faq/linux-unix-bsd-is-ntp-client-working/

Install

sudo apt install ntp

Test

sntp 127.0.0.1
sntp 4.2.8p10@1.3728-o (1)
kod_init_kod_db(): Cannot open KoD db file /var/db/ntp-kod: No such file or directory
2020-03-24 21:45:27.388183 (+0000) -0.001741 +/- 0.332805 127.0.0.1 s3 no-leap

s3 no-leap usually means you are good

Allow through firewall for other hosts.

vim /etc/nftables.conf

table inet filter {
    chain input {
        udp dport 123 accept
        udp sport 123 accept

systemctl restart nftables

https://www.digitalocean.com/community/tutorials/how-to-configure-ntp-for-use-in-the-ntp-pool-project-on-ubuntu-16-04

resync after drift

systemctl stop ntp
 sudo ntpd -gq
systmectl start ntp