Ubuntu 18.04
Sponsored Link

NTP サーバー : NTPd の設定2018/04/27

 
NTPd をインストールして、時刻同期のための NTP サーバーを構築します。なお、NTP は 123/UDP を使用します。
[1] NTPd のインストールと設定です。
root@dlp:~#
apt -y install ntp
root@dlp:~#
vi /etc/ntp.conf
# 21行目:デフォルト設定はコメントにして自身のタイムゾーンのNTPサーバーを追記

#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.
#pool ntp.ubuntu.com
server ntp.nict.jp iburst
server ntp1.jst.mfeed.ad.jp iburst
server ntp2.jst.mfeed.ad.jp iburst 

# 53行目:時刻同期を許可する範囲を追記

restrict 10.0.0.0 mask 255.255.255.0 nomodify notrap
root@dlp:~#
systemctl restart ntp
# 動作確認

root@dlp:~#
ntpq -p

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 ntp-a3.nict.go. .NICT.           1 u    1   64    1   29.497   12.191   0.000
 ntp1.jst.mfeed. 133.243.236.17   2 u    2   64    1   19.361   13.572   0.000
 ntp2.jst.mfeed. 133.243.236.17   2 u    2   64    1   19.172   13.462   0.201
関連コンテンツ