hack のためのネタ帳, etc,,,

network time protocol

参考になるページ等

Tips

default restrict が以下のように設定されている場合、
ntp server と同期出来なくなってる場合がある模様。
ntpq -p してみて when が - のまま変化がない場合はこれが怪しい。
# Prohibit general access to this service.
restrict default ignore

# Permit all access over the loopback interface.  This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
前者は、接続を default で無視するため、すべての入出力が遮断される。
後者は、localhost にもに接続を許可している。
しかし、前者の設定により server に対する接続も無視されるため、同期に失敗するとの事。

これに関しては一応 ntp.conf に以下のような説明も書かれているのだが、意外と見落とされてて同期に失敗している場合がある模様。
# --- OUR TIMESERVERS ----- 
# or remove the default restrict line 
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.

# restrict mytrustedtimeserverip mask 255.255.255.255 nomodify notrap noquery
# server mytrustedtimeserverip
なお、上記の説明は FQDN で指定されているが IP 直指定しないと同期出来ない場合もある模様。
また、server 行に指定する FQDN は default restrict 行があると IP から逆引き出来ない場合に同期に失敗しているような気がする。
DNS へ restrict を開けておく必要があるのかなと思い試してみたが、効果は見られなかった。
とりあえず IP 直指定してる場合は問題が生じない模様。

参考:
タグ

コメントをかく


「http://」を含む投稿は禁止されています。

利用規約をご確認のうえご記入下さい

Wiki内検索

フリーエリア

管理人/副管理人のみ編集できます