Ubuntu 26.04

NTP Server : Configure NTP Server (NTPsec)2026/04/24

 

Install NTPsec and Configure NTP server for time adjustment. NTP uses 123/UDP.

[1] Install and Configure NTPsec.
root@dlp:~#
apt -y install ntpsec
root@dlp:~#
vi /etc/ntpsec/ntp.conf
# line 25 : if you use your own NTP servers only and also 
# pool entries are a few, change number of value below or comment out the line
#tos minclock 4 minsane 3

# line 35 : comment out default settings and add NTP server pool you like to use
# * OK to keep default if you do not have specific requirements
#pool 0.ubuntu.pool.ntp.org iburst
#pool 1.ubuntu.pool.ntp.org iburst
#pool 2.ubuntu.pool.ntp.org iburst
#pool 3.ubuntu.pool.ntp.org iburst

# Use Ubuntu's ntp server as a fallback.
#server ntp.ubuntu.com
pool ntp.nict.jp iburst 

root@dlp:~#
systemctl restart ntpsec
[2] If UFW is enabled, allow NTP service. NTP uses [123/UDP].
root@dlp:~#
ufw allow ntp

Rule added
Rule added (v6)
[3] Verify it works normally.
root@dlp:~#
ntpq -p

     remote                                   refid      st t when poll reach   delay   offset   jitter
=======================================================================================================
 ntp.nict.jp                             .POOL.          16 p    -  256    0   0.0000   0.0000   0.0001
-ntp-b2.nict.go.jp                       .NICT.           1 u   46   64    1  18.8696   0.0448   1.3737
-ntp-a3.nict.go.jp                       .NICT.           1 u   46   64    1  17.0480  -1.8326   1.4077
*ntp-k1.nict.jp                          .NICT.           1 u   46   64    1  13.3218  -0.2959   1.4842
+ntp-a2.nict.go.jp                       .NICT.           1 u   47   64    1  16.5628  -1.3190   1.3675
+ntp-b3.nict.go.jp                       .NICT.           1 u   47   64    1  20.2384  -0.5751   1.3671
 ntp-a2.nict.go.jp                       .INIT.          16 u    -   64    0   0.0000   0.0000   0.0001
 ntp-a3.nict.go.jp                       .INIT.          16 u    -   64    0   0.0000   0.0000   0.0001
 2001:ce8:78::2                          .INIT.          16 u    -   64    0   0.0000   0.0000   0.0001
Matched Content