Home | History | Annotate | Line # | Download | only in etc
ntp.conf revision 1.16
      1  1.16       apb # $NetBSD: ntp.conf,v 1.16 2014/01/06 11:21:34 apb Exp $
      2   1.1      fair #
      3   1.7     fredb # NetBSD default Network Time Protocol (NTP) configuration file for ntpd
      4   1.8     fredb 
      5   1.8     fredb # This file is intended to be both a usable default, and a Quick-Start
      6   1.8     fredb # Guide. The directives and options listed here are not at all complete.
      7   1.9      reed # A great deal of additional documentation, including links to FAQS and
      8   1.8     fredb # other guides, may be found on the official NTP web site, in particular
      9   1.8     fredb #
     10   1.8     fredb #	http://www.ntp.org/documentation.html
     11   1.8     fredb #
     12   1.1      fair 
     13   1.1      fair # Process ID file, so that the daemon can be signalled from scripts
     14   1.1      fair 
     15   1.3     lukem pidfile		/var/run/ntpd.pid
     16   1.1      fair 
     17   1.2    simonb # The correction calculated by ntpd(8) for the local system clock's
     18   1.7     fredb # drift is stored here.
     19   1.1      fair 
     20   1.3     lukem driftfile	/var/db/ntp.drift
     21   1.1      fair 
     22   1.7     fredb # Suppress the syslog(3) message for each peer synchronization change.
     23   1.1      fair 
     24   1.3     lukem logconfig	-syncstatus
     25   1.5     fredb 
     26   1.5     fredb # This will help minimize disruptions due to network congestion. Don't
     27   1.5     fredb # do this if you configure only one server!
     28   1.5     fredb 
     29   1.5     fredb tos		minsane 2
     30   1.1      fair 
     31  1.10  christos # Set the number of tries to register with mdns. 0 means never
     32  1.10  christos #
     33  1.10  christos mdnstries	0
     34  1.10  christos 
     35  1.15  christos # New ntpd disables the ntpdc protocol by default, to re-enable uncomment
     36  1.15  christos # the following line
     37  1.15  christos # enable mode7
     38  1.15  christos 
     39  1.16       apb # Access control restrictions.
     40  1.16       apb # See /usr/share/doc/html/ntp/accopt.html for syntax.
     41  1.16       apb # See <http://support.ntp.org/bin/view/Support/AccessRestrictions> for advice.
     42  1.16       apb # Last match wins.
     43  1.16       apb #
     44  1.16       apb # Some of the more common keywords are:
     45  1.16       apb #   ignore      Deny packets of all kinds.
     46  1.16       apb #   kod         Send "kiss-o'-death" packets if clients exceed rate
     47  1.16       apb #               limits.
     48  1.16       apb #   nomodify    Deny attempts to modify the state of the server via
     49  1.16       apb #               ntpq or ntpdc queries.
     50  1.16       apb #   noquery     Deny all ntpq and ntpdc queries.  Does not affect time
     51  1.16       apb #               synchronisation.
     52  1.16       apb #   nopeer      Prevent establishing an new peer association.
     53  1.16       apb #               Does not affect preconfigured peer associations.
     54  1.16       apb #               Does not affect client/server time synchronisation.
     55  1.16       apb #   noserve     Deny all time synchronisation.  Does not affect ntpq or
     56  1.16       apb #               ntpdc queries.
     57  1.16       apb #   notrap      Deny the trap subset of the ntpdc control message protocol.
     58  1.16       apb #   notrust     Deny packets that are not cryptographically authenticated.
     59  1.16       apb #
     60  1.16       apb # By default, either deny everything, or allow client/server time exchange
     61  1.16       apb # but deny configuration changes, queries, and peer associations that were not
     62  1.16       apb # explicitly configured.
     63  1.16       apb # (Uncomment one of the following "restrict default" lines.)
     64  1.16       apb #
     65  1.16       apb #restrict default ignore
     66  1.16       apb restrict default kod nopeer noquery
     67  1.16       apb 
     68  1.16       apb # Fewer restrictions for the local subnet.
     69  1.16       apb # (Uncomment and adjust as appropriate.)
     70  1.16       apb #
     71  1.16       apb #restrict 192.0.2.0 mask 255.255.255.0 kod nomodify notrap nopeer
     72  1.16       apb #restrict 2001:db8:: mask ffff:ffff::  kod nomodify notrap nopeer
     73  1.16       apb 
     74  1.16       apb # No restrictions for localhost.
     75  1.16       apb #
     76  1.16       apb restrict 127.0.0.1
     77  1.16       apb restrict ::1
     78  1.16       apb 
     79   1.7     fredb # Hereafter should be "server" or "peer" statements to configure other
     80   1.7     fredb # hosts to exchange NTP packets with. Peers should be selected in such
     81   1.7     fredb # a way that the network path to them is symmetric (that is, the series
     82   1.7     fredb # of links and routers used to get to the peer is the same one that the
     83   1.7     fredb # peer uses to get back. NTP assumes such symmetry in its network delay
     84   1.7     fredb # calculation. NTP will apply an incorrect adjustment to timestamps
     85   1.7     fredb # received from the peer if the path is not symmetric. This can result
     86   1.7     fredb # in clock skew (your system clock being maintained consistently wrong
     87   1.7     fredb # by a certain amount).
     88   1.7     fredb #
     89   1.1      fair # The best way to select symmetric peers is to make sure that the
     90   1.7     fredb # network path to them is as short as possible (this reduces the chance
     91   1.7     fredb # that there is more than one network path between you and your peer).
     92   1.7     fredb # You can measure these distances with the traceroute(8)  program. The
     93   1.7     fredb # best place to start looking for NTP peers for your system is within
     94   1.7     fredb # your own network, or at your Internet Service Provider (ISP).
     95   1.1      fair #
     96   1.7     fredb # Ideally, you should select at least three other systems to talk NTP
     97   1.7     fredb # with, for an "what I tell you three times is true" effect.
     98   1.1      fair #
     99  1.16       apb # A "restrict" line for each configured peer or server might be necessary,
    100  1.16       apb # if the "restrict default" settings are very restrictive.  As a courtesy
    101  1.16       apb # to configured peers and servers, consider allowing them to query.
    102   1.1      fair 
    103   1.3     lukem #peer		an.ntp.peer.goes.here
    104   1.3     lukem #server		an.ntp.server.goes.here
    105  1.16       apb #restrict	an.ntp.server.goes.here nomodify notrap
    106   1.4       agc 
    107   1.6     fredb # Public servers from the pool.ntp.org project. Volunteer's servers
    108   1.6     fredb # are dynamically assigned to the CNAMES below via DNS round-robin.
    109   1.6     fredb # The pool.ntp.org project needs more volunteers! The only criteria to
    110   1.6     fredb # join are a nailed-up connection and a static IP address. For details,
    111   1.6     fredb # see the web page:
    112   1.6     fredb #
    113  1.14  christos #	http://www.pool.ntp.org/join.html
    114   1.6     fredb #
    115   1.6     fredb 
    116   1.6     fredb # Depending on the vagaries of DNS can occasionally pull in the same
    117   1.6     fredb # server twice. The following CNAMES are guaranteed to be disjoint, at
    118  1.13  christos # least over some short interval. The following servers are allocated
    119  1.13  christos # to the NetBSD project.
    120   1.6     fredb 
    121  1.13  christos server		0.netbsd.pool.ntp.org
    122  1.16       apb restrict	0.netbsd.pool.ntp.org nomodify notrap
    123  1.13  christos server		1.netbsd.pool.ntp.org
    124  1.16       apb restrict	1.netbsd.pool.ntp.org nomodify notrap
    125  1.13  christos server		2.netbsd.pool.ntp.org
    126  1.16       apb restrict	2.netbsd.pool.ntp.org nomodify notrap
    127  1.13  christos server		3.netbsd.pool.ntp.org
    128  1.16       apb restrict	3.netbsd.pool.ntp.org nomodify notrap
    129