ntpサーバ
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
**設定 [#g41d4bff]
# vi /etc/ntp.conf
# デフォルトの設定は全ホストとのNTP通信を許可しない
restrict default ignore
# localhostはアクセス制限なし
restrict 127.0.0.1
# クライアントのアクセス制限
restrict 192.168.100.2 mask 255.255.255.255 noquery nomo...
# 外部(上層)NTPサーバへのアクセスを許可(下のserverで...
restrict 210.173.160.27 mask 255.255.255.255 nomodify no...
restrict 210.173.160.57 mask 255.255.255.255 nomodify no...
restrict 210.173.160.87 mask 255.255.255.255 nomodify no...
# 同期源となる上層NTPサーバを指定
#server 0.pool.ntp.org
#server 1.pool.ntp.org
#server 2.pool.ntp.org
server 210.173.160.27 # ntp1.jst.mfeed.ad.jp
server 210.173.160.57 # ntp2.jst.mfeed.ad.jp
server 210.173.160.87 # ntp3.jst.mfeed.ad.jp
# fudgeはローカル時計の優先順位を設定してるっぽい
# 上で設定した上層のNTPサーバ(ntp1.jst.mfeed.ad.jp)がs...
# でも他のサイトの説明とかを見てもデフォルトの10だったり
# コメントアウトしたりstratumをかかなかったりしてバラバ...
# これで正解かは微妙
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 3
**起動 [#ze786d24]
# /etc/rc.d/init.d/ntpd start
**確認 [#k780a50a]
設定で指定したntpサーバが表示されていればOK
# /usr/sbin/ntpq -p
remote refid st t when poll reach ...
========================================================...
ntp1.jst.mfeed. 210.173.160.56 2 u 15 64 1 ...
ntp2.jst.mfeed. 210.173.160.86 2 u 14 64 1 ...
ntp3.jst.mfeed. 210.173.160.86 2 u 13 64 1 ...
LOCAL(0) LOCAL(0) 10 l 23 64 77 ...
**落とし穴 [#p4d011b6]
-クライアントからの時刻同期はサーバ側を立ち上げて、しばら...
-サーバ側のファイヤーウォールが有効だと123:udpを許可する...
# nmap -sU localhost
終了行:
**設定 [#g41d4bff]
# vi /etc/ntp.conf
# デフォルトの設定は全ホストとのNTP通信を許可しない
restrict default ignore
# localhostはアクセス制限なし
restrict 127.0.0.1
# クライアントのアクセス制限
restrict 192.168.100.2 mask 255.255.255.255 noquery nomo...
# 外部(上層)NTPサーバへのアクセスを許可(下のserverで...
restrict 210.173.160.27 mask 255.255.255.255 nomodify no...
restrict 210.173.160.57 mask 255.255.255.255 nomodify no...
restrict 210.173.160.87 mask 255.255.255.255 nomodify no...
# 同期源となる上層NTPサーバを指定
#server 0.pool.ntp.org
#server 1.pool.ntp.org
#server 2.pool.ntp.org
server 210.173.160.27 # ntp1.jst.mfeed.ad.jp
server 210.173.160.57 # ntp2.jst.mfeed.ad.jp
server 210.173.160.87 # ntp3.jst.mfeed.ad.jp
# fudgeはローカル時計の優先順位を設定してるっぽい
# 上で設定した上層のNTPサーバ(ntp1.jst.mfeed.ad.jp)がs...
# でも他のサイトの説明とかを見てもデフォルトの10だったり
# コメントアウトしたりstratumをかかなかったりしてバラバ...
# これで正解かは微妙
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 3
**起動 [#ze786d24]
# /etc/rc.d/init.d/ntpd start
**確認 [#k780a50a]
設定で指定したntpサーバが表示されていればOK
# /usr/sbin/ntpq -p
remote refid st t when poll reach ...
========================================================...
ntp1.jst.mfeed. 210.173.160.56 2 u 15 64 1 ...
ntp2.jst.mfeed. 210.173.160.86 2 u 14 64 1 ...
ntp3.jst.mfeed. 210.173.160.86 2 u 13 64 1 ...
LOCAL(0) LOCAL(0) 10 l 23 64 77 ...
**落とし穴 [#p4d011b6]
-クライアントからの時刻同期はサーバ側を立ち上げて、しばら...
-サーバ側のファイヤーウォールが有効だと123:udpを許可する...
# nmap -sU localhost
ページ名: