If you are interested in maintaining your system clock time from a public Network Time Protocol (NTP) server, packages and complete documentation are available from Time WWW server. The purpose of the server is to provide the latest information on the Network Time Protocol (NTP) product. You can also download a copy of version 4.0.73e13, current as of October 26, 1998, from this site.
17.1 Quick Configuration
NTP can be run as a daemon (ntpd) or run periodically from cron as an application program (ntpdate). This example runs ntpdate at boot time and then once a day from cron. The example servers were listed on the Time WWW Server as being public servers available for use in New England.
A couple notes about the servers. Be sure to check which servers are offering public service to your geographic area. Also check whether or not each server you choose requests that you inform them first. Quite a few of the sites request that you send them email stating your intention to use their service.
17.2 Adding the Servers to /etc/hosts/
If you use the server's host name in your rules, rather than the IP address, create an entry for the server in /etc/hosts/.
17.3 Initializing the Clock at Boot Time
Add the following to /etc/rc.d/rc.local/:
/usr/local/bin/ntpdate \
dominator.eecs.harvard.edu \
timeserver.cs.umb.edu
17.4 Updating the Clock on a Daily Basis
Create an executable script, /etc/cron.daily/get-ntp-time/, containing the following lines to query one or more servers:
#!/bin/sh
/usr/local/bin/ntpdate \
dominator.eecs.harvard.edu \
timeserver.cs.umb.edu
An NTP client requires remote access from and to UDP port 123. Based on the servers above, add the following UDP packet filtering rules to /etc/rc.d/rc.firewall/:
ipfwadm -I -a accept -P udp -W $EXTERNAL_INTERFACE \
-S dominator.eecs.harvard.edu 123 \
-D $IPADDR 123 $UNPRIVPORTS
ipfwadm -I -a accept -P udp -W $EXTERNAL_INTERFACE \
-S timeserver.cs.umb.edu 123 \
-D $IPADDR 123 $UNPRIVPORTS
