作業日記@HatenaBlog

各種の作業メモ

ntp設定

参考サイト
http://freebsd.sing.ne.jp/FreeBSD/18.html


/etc/ntp.confに設定したサーバ一覧
server 210.173.160.27
server 210.173.160.57
server 210.173.160.87
server 133.97.166.42
server 133.97.166.48

こっち採用

参考サイト
http://www.fkimura.com/freebsd-tips0.html


/etc/rc.conf に以下のように設定を書く。(FreeBSD 5.4-RELEASEでの例)

ntpdate_enable="YES"
ntpdate_flags="-s -b 210.173.160.87"
ntpd_enable="YES"
ntpd_flags="-p /var/run/ntpd.pid -c /etc/ntpd.conf"

これに必要な /etc/ntpd.confの例

restrict default ignore
restrict 127.0.0.1
restrict 210.173.160.27 noquery nomodify notrap
restrict 210.173.160.57 noquery nomodify notrap
restrict 210.173.160.87 noquery nomodify notrap

server ntp1.jst.mfeed.ad.jp
server ntp2.jst.mfeed.ad.jp
server ntp3.jst.mfeed.ad.jp

driftfile /var/db/ntpd.drift
logfile /var/log/ntpd.log

jail側では動かなかった(当たり前か)