User Tools

Site Tools


vm:ntp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vm:ntp [2023/02/14 16:10] – [Ubuntu] warnaudvm:ntp [2025/02/25 08:06] (current) – [Debian] warnaud
Line 1: Line 1:
 +====== NTP server ======
  
 +====== Debian ======
 +
 +OS: Debian 11 (testing)\\
 +===== NTP server =====
 +
 +<code bash>
 +apt-get install ntp
 +sntp --version
 +vi /etc/ntp.conf</code>
 +choose a pool close : https://support.ntp.org/bin/view/Servers/NTPPoolServers
 +<code perl>
 +server 0.ch.pool.ntp.org
 +server 1.ch.pool.ntp.org
 +server 2.ch.pool.ntp.org
 +server 3.ch.pool.ntp.org
 +</code>
 +<code bash> vi/etc/ntpsec/ntp.conf</code>
 +<code perl>
 +# Comment this out if you have a refclock and want it to be able to discipline
 +# the clock by itself (e.g. if the system is not connected to the network).
 +#tos minclock 4 minsane 3</code>
 +<code bash>systemctl restart ntp
 +systemctl status ntp</code>
 +==== Ubuntu ====
 +<code perl>
 +...kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized</code>
 +<code bash> ufw allow from any to any port 123 proto udp</code>
 +==== Debian ====
 +<code bash> apt install -y firewalld
 +firewall-cmd --add-service={ssh,ntp} --permanent
 +firewall-cmd --reload
 +</code>
 +
 +==== Clients ====
 +=== Quick check ===
 +
 +<code bash> ntpdate ntp.fortier-family.com</code>
 +
 +=== More ===
 +-> [[os:linux:systemd:ntp_client|NTP]]
 +
 +
 +====== Reference ======
 +
 +  * https://help.ui.com/hc/en-us/articles/220066768-UniFi-Network-How-to-Install-and-Update-via-APT-on-Debian-or-Ubuntu
 +  * https://community.ui.com/questions/Java-Home-Directory-Fail-Issue-on-Ubuntu-RESOLVED/1faea5fd-6eda-4be9-a12f-676ef6be2529
 +  * https://community.ui.com/questions/UniFi-Installation-Scripts-or-UniFi-Easy-Update-Script-or-UniFi-Lets-Encrypt-or-UniFi-Easy-Encrypt-/ccbc7530-dd61-40a7-82ec-22b17f027776
 +  * https://vitux.com/how-to-install-ntp-server-and-client-on-ubuntu/
 +  * https://linuxize.com/post/how-to-set-or-change-timezone-on-ubuntu-20-04/
 +  * https://davidshomelab.com/unifi-controller-setup-on-ubuntu-20-04lts/