YAMAHA RTX1210でNTPサーバ設定

ルータ配下のクライントからNTPサーバへの接続ができない又、ルータ自体でNTPサーバへ接続ができない状態を解消する。

サーバに接続できません

# ntpdate ntp.nict.jp
エラー: サーバに接続できません

ip filterの定義

ip filter 5090 pass * 192.168.0.0/16 udp ntp ntp,1024-65535

フィルタの適用

pp select 1
ip pp secure filter in 1020 1030 4010 4020 5000 5010 5020 5030 5040 5050 5090

フィルタの番号は5090(当ルータの設定 番号自体識別できればいい)
NTPサーバは任意(クライアントによってNTPサーバ設定が違う)
アクセス可能クライアントのIPアドレスは192.168.0.0/16
ポートは1024-65535に制限

RTXからの接続確認

# ntpdate ntp.nict.jp
2023/11/07 11:35:27 +0second

詳しくはYAMAHAの解説サイト

クライアント側からの接続確認

Windows11

設定→時刻と言語→関連リンク→その他の時計→日付と時刻→インターネット時刻
windows_ntp

windows_ntp2

Linux CentOS8

# cat /etc/centos-release
CentOS Linux release 8.5.2111

# rpm -qa | grep chrony
chrony-4.1-1.el8.x86_64

# vi /etc/chrony.conf
pool ntp.jst.mfeed.ad.jp iburst
pool ntp.nict.jp iburst
allow 192.168.0.0/16

Firewallの調整

chronyサービスの再起動

# systemctl restart chronyd

chrony動作確認

# chronyc sources
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^- ntp2.jst.mfeed.ad.jp 2 6 37 9 -865us[ -719us] +/- 57ms
^- ntp1.jst.mfeed.ad.jp 2 6 37 9 -885us[ -739us] +/- 65ms
^- ntp3.jst.mfeed.ad.jp 2 6 37 10 +100us[ +246us] +/- 64ms
^+ ntp-k1.nict.jp 1 6 37 10 +210us[ +356us] +/- 6798us
^* ntp-a2.nict.go.jp 1 6 37 9 +43us[ +189us] +/- 2647us
^+ ntp-a3.nict.go.jp 1 6 37 10 -208us[ -62us] +/- 2768us
^+ ntp-b2.nict.go.jp 1 6 37 11 +111us[ +257us] +/- 3026us

LAN内またRTXからNTPサーバに接続ができるようになり管理しているホストの時刻はピッタリ合致して気持ち良い状態になりました。いままでうやむやにしていたのでスッキリしました。

コメント