see: * Samulat book

install: ntp, ntp-simple (server), ntpdate (client).

Use Internet time-server

You can find public time-servers at: http://www.eecis.udel.edu/~mills/ntp/servers.htm

Currently I'm using: * ptbtime1.ptb.de (Braunschweig) * ntp1.fau.de (Erlangen) * time.fu-berlin.de

Server

Run dpkg-reconfigure ntp-simple to configure timeserver. Configuration file is /etc/ntp.conf.

You can see the status of the server with:

root$ ntpq
ntpq> pe       # peers
ntpq> q        # quit

Add the following to ntp.conf for access-restrictions.

# by default, don't trust and don't allow modifications
restrict default notrust nomodify

# these guys are trusted for time, but no modifications allowed
restrict 192.168.100.0 mask 255.255.255.0 nomodify

# the local addresses are unrestricted
restrict 192.168.100.1
restrict 127.0.0.1

To restart server run /etc/init.d/ntp restart.

It's not necessary to run ntpdate (client) on ntp-server.

Linux client

Install ntpdate. Servers are listed in /etc/default/ntp-servers. By default ntpdate is run at system start: /etc/init.d/ntpdate.