ntp.conf revision 193635
1193635Sedwin#
2193635Sedwin# $FreeBSD: head/etc/ntp.conf 193635 2009-06-07 13:26:57Z edwin $
3193635Sedwin#
4193635Sedwin# Default NTP servers for the FreeBSD operating system.
5193635Sedwin#
6193635Sedwin# Don't forget to enable ntpd in /etc/rc.conf with:
7193635Sedwin# ntpd_enable="YES"
8193635Sedwin#
9193635Sedwin# The driftfile is by default /var/db/ntpd.drift, check
10193635Sedwin# /etc/defaults/rc.conf on how to change the location.
11193635Sedwin#
12193635Sedwin
13193635Sedwin#
14193635Sedwin# The following three servers will give you a random set of three
15193635Sedwin# NTP servers geographically close to you.
16193635Sedwin# See http://en.wikipedia.org/wiki/NTP_pool for details.
17193635Sedwin#
18193635Sedwin# The option `iburst' is used for faster initial synchronisation.
19193635Sedwin# The option `maxpoll 9' is used to prevent PLL/FLL flipping on FreeBSD.
20193635Sedwin#
21193635Sedwinserver 0.pool.ntp.org iburst maxpoll 9
22193635Sedwinserver 1.pool.ntp.org iburst maxpoll 9
23193635Sedwinserver 2.pool.ntp.org iburst maxpoll 9
24193635Sedwin
25193635Sedwin#
26193635Sedwin# If you want to pick yourself which country's public NTP server
27193635Sedwin# you want sync against, comment out the above servers, uncomment
28193635Sedwin# the next ones and replace CC with the country's abbrevation.
29193635Sedwin# Make sure that the hostnames resolve to a proper IP address!
30193635Sedwin#
31193635Sedwin# server 0.CC.pool.ntp.org iburst maxpoll 9
32193635Sedwin# server 1.CC.pool.ntp.org iburst maxpoll 9
33193635Sedwin# server 2.CC.pool.ntp.org iburst maxpoll 9
34193635Sedwin
35193635Sedwin#
36193635Sedwin# Security: Only accept NTP traffic from the following hosts.
37193635Sedwin# The following configuration example only accepts traffic from the
38193635Sedwin# above defined servers.
39193635Sedwin#
40193635Sedwin# Please note that this example doesn't work for the servers in
41193635Sedwin# the pool.ntp.org domain since they return multiple A records.
42193635Sedwin# (This is the reason that by default they are commented out)
43193635Sedwin#
44193635Sedwin#restrict default ignore
45193635Sedwin#restrict 0.pool.ntp.org nomodify nopeer noquery notrap
46193635Sedwin#restrict 1.pool.ntp.org nomodify nopeer noquery notrap
47193635Sedwin#restrict 2.pool.ntp.org nomodify nopeer noquery notrap
48193635Sedwin#restrict 127.0.0.1
49193635Sedwin#restrict -6 ::1
50193635Sedwin#restrict 127.127.1.0
51193635Sedwin
52193635Sedwin#
53193635Sedwin# If we lose sync against all configured servers, the NTP clients
54193635Sedwin# syncing against this server will lose sync too. To overcome this,
55193635Sedwin# we will act as a stratum 10 server with our own internal clock
56193635Sedwin# so that everybody at least will have the same time as we have.
57193635Sedwin#
58193635Sedwinserver 127.127.1.0
59193635Sedwinfudge 127.127.1.0 stratum 10
60