GentooNtpServer

提供:やる気向上作戦
移動: 案内, 検索

GentooLinux


NTPサーバのセットアップ

ntpをインストール

ntpのemerge

% emerge ntp
% rc-update add ntpd default

ntp.confを書き換え

% nano -w /etc/ntp.conf

(以下内容)

# デフォルトで、全てのIPアドレスからのアクセスを拒否
restrict default ignore
# ローカルアクセスを許可
restrict 127.0.0.1
# LAN内からのアクセスを許可。ただし時刻変更は拒否する
restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap
# mfeed.ad.jpのNTPサーバを追加
restrict 210.173.160.87 nomodify notrap noquery
restrict 210.173.160.57 nomodify notrap noquery
restrict 210.173.160.27 nomodify notrap noquery
server   210.173.160.87  # ntp3.jst.mfeed.sd.jp
server   210.173.160.57  # ntp2.jst.mfeed.sd.jp
server   210.173.160.27  # ntp1.jst.mfeed.sd.jp
# ドリフトファイルの指定
driftfile       /var/lib/ntp/ntp.drift
# 認証は必要なし
authenticate no
個人用ツール