Changes between Version 12 and Version 13 of TipAndDoc/network/ntp


Ignore:
Timestamp:
Mar 28, 2011 7:09:52 PM (13 years ago)
Author:
mitty
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TipAndDoc/network/ntp

    v12 v13  
    66 
    77 = ntpd = 
    8  
    98 * [http://www.aconus.com/~oyaji/ntp/ntp.htm NTPDの設定] 
    109 * [http://www.ipa.go.jp/security/awareness/administrator/secure-web/chap4/4_ntpd.html 4.2.3 ntpdのインストールと設定] 
    11  
    12  * /etc/ntp.conf 
    13  
    14  == IPv6 == 
    15  === fource IPv4 === 
     10 * http://wiki.nothing.sh/page/NTP 
     11 
     12 == /etc/ntp.conf == 
     13 * SakuraのVPSで運用中 
     14{{{ 
     15# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help 
     16 
     17driftfile /var/lib/ntp/ntp.drift 
     18 
     19 
     20# Enable this if you want statistics to be logged. 
     21#statsdir /var/log/ntpstats/ 
     22 
     23statistics loopstats peerstats clockstats 
     24filegen loopstats file loopstats type day enable 
     25filegen peerstats file peerstats type day enable 
     26filegen clockstats file clockstats type day enable 
     27 
     28 
     29# You do need to talk to an NTP server or two (or three). 
     30#server ntp.ubuntu.com 
     31server -4 ntp1.sakura.ad.jp        # Sakura => 210.188.224.14 
     32server ntp1.sakura.ad.jp           # Sakura => 2001:e40:100:208::123 
     33server -4 ntp.nict.jp              # NICT => 133.243.238.163 
     34server -4 ntp.nict.jp              # NICT => 133.243.238.164 
     35server -4 ntp.nict.jp              # NICT => 133.243.238.243 
     36server -4 ntp.nict.jp              # NICT => 133.243.238.244 
     37server ntp.nict.jp                 # NICT => 2001:2f8:29:100::fff3 
     38server ntp.nict.jp                 # NICT => 2001:2f8:29:100::fff4 
     39server ntp.jst.mfeed.ad.jp         # MFEED => 210.173.160. 
     40server ntp.netlab.is.tsukuba.ac.jp # => 130.158.83.97 
     41 
     42server 127.127.1.0                 # local system clock (not IP address) 
     43 
     44# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for 
     45# details.  The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions> 
     46# might also be helpful. 
     47# 
     48# Note that "restrict" applies to both servers and clients, so a configuration 
     49# that might be intended to block requests from certain clients could also end 
     50# up blocking replies from your own upstream servers. 
     51 
     52# By default, exchange time with everybody, but don't allow configuration. 
     53#restrict -4 default kod notrap nomodify nopeer noquery 
     54#restrict -6 default kod notrap nomodify nopeer noquery 
     55restrict -4 default ignore 
     56restrict -6 default ignore 
     57 
     58# Local users may interrogate the ntp server more closely. 
     59restrict 127.0.0.1 
     60restrict ::1 
     61 
     62# Clients from this (example!) subnet have unlimited access, but only if 
     63# cryptographically authenticated. 
     64#restrict 192.168.123.0 mask 255.255.255.0 notrust 
     65 
     66 
     67restrict 210.188.224.14  mask 255.255.255.255 nomodify notrap noquery 
     68restrict 133.243.238.163 mask 255.255.255.255 nomodify notrap noquery 
     69restrict 133.243.238.164 mask 255.255.255.255 nomodify notrap noquery 
     70restrict 133.243.238.243 mask 255.255.255.255 nomodify notrap noquery 
     71restrict 133.243.238.244 mask 255.255.255.255 nomodify notrap noquery 
     72restrict 210.173.160.27  mask 255.255.255.255 nomodify notrap noquery 
     73restrict 210.173.160.57  mask 255.255.255.255 nomodify notrap noquery 
     74restrict 210.173.160.87  mask 255.255.255.255 nomodify notrap noquery 
     75restrict 130.158.83.97   mask 255.255.255.255 nomodify notrap noquery 
     76restrict 2001:e40:100:208::123 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff nomodify notrap noquery 
     77restrict 2001:2f8:29:100::fff3 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff nomodify notrap noquery 
     78restrict 2001:2f8:29:100::fff4 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff nomodify notrap noquery 
     79 
     80 
     81# If you want to provide time to your local subnet, change the next line. 
     82# (Again, the address is an example only.) 
     83#broadcast 192.168.123.255 
     84 
     85# If you want to listen to time broadcasts on your local subnet, de-comment the 
     86# next lines.  Please do this only if you trust everybody on the network! 
     87#disable auth 
     88#broadcastclient 
     89}}} 
     90 * $ ntpq -p 
     91{{{ 
     92     remote           refid      st t when poll reach   delay   offset  jitter 
     93============================================================================== 
     94-ntp1.sakura.ad. .GPS.            1 u    5   64  377    0.695   -0.011   0.888 
     95+2001:e40:100:20 .GPS.            1 u   10   64  377    1.434   -1.154   0.829 
     96*ntp-a3.nict.go. .NICT.           1 u   13   64  377    1.411   -0.539   0.481 
     97+ntp-a2.nict.go. .NICT.           1 u   62   64  377    1.357   -1.173   0.486 
     98+ntp-b3.nict.go. .NICT.           1 u    1   64  377    3.049   -1.105   0.676 
     99+ntp-a3.nict.go. .NICT.           1 u   61   64  377    2.029   -1.144   0.675 
     100-ntp-a2.nict.go. .NICT.           1 u    2   64  377    2.069    0.197   0.737 
     101-ntp3.jst.mfeed. 210.173.160.86   2 u    -   64  377    1.292   -0.154   0.824 
     102-phoenix-gw.netl 210.173.160.87   3 u   61   64  377    8.147    1.432   0.591 
     103 LOCAL(0)        .LOCL.           5 l   63   64  377    0.000    0.000   0.001 
     104}}} 
     105 
     106 == fource IPv4 == 
    16107 1. /etc/default/ntp (Ubuntu) 
    17108{{{