[ntp:questions] Default config on Ubuntu doesn't work as client

Michael B Allen miallen at ioplex.com
Mon Mar 10 03:15:35 UTC 2008


When installing an NTPD package on Linux would you expect it to work
by default or must one always be expected to modify the config?

Specifically, is it supposed to set the local server time from the target
time server without any configuration minus perhaps setting a time server
ip address?

I ask because I don't recall ever seeing a Linux ntpd daemon work

For example, I just installed the "ntp" package on a Ubuntu server. So
I waited an hour and absolutely nothing happened. The time has been out
of sync by 3 minutes since ntpd was installed.

I did a capture and I can see requests are being answered. There are no
firewalls in the way.

The default config is inlined below. The only thing I changed was
'server' which is the time server (which I know works).



# cat /etc/ntp.conf 
# /etc/ntp.conf, configuration for ntpd

driftfile /var/lib/ntp/ntp.drift

# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

# You do need to talk to an NTP server or two (or three).
#server ntp.ubuntu.com

# By default, exchange time with everybody, but don't allow configuration.
# See /usr/share/doc/ntp-doc/html/accopt.html for details.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery

# Local users may interrogate the ntp server more closely.
restrict ::1

# Clients from this (example!) subnet have unlimited access,
# but only if cryptographically authenticated
#restrict  mask notrust

# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)

# If you want to listen to time broadcasts on your local subnet,
# de-comment the next lines. Please do this only if you trust everybody
# on the network!
#disable auth

More information about the questions mailing list