![How to Configure a Simple NTP Server](https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/03/IB_Post1_Img/7802.image002.gif)
Image source: https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/03/IB_Post1_Img/7802.image002.gif
The NTP software distribution can be freely download from the NTP website, ntp.org. As well as containing the NTP daemon for Linux, the distribution also contains a number of utilities and configuration scripts. These utilities and scripts aid the installation process and provide debugging facilities to trace installation problems. Many Linux operating systems install the NTP distribution by default, or at least offer it as a pre-configured RMP package.
The NTP daemon is configured using a configuration file 'ntp.conf'. A list of commands can be specified in the configuration file to indicate which servers the daemon is to synchronise to and also to specify various authentication and access control options.
The NTP daemon synchronises to an external NTP server. Often, Internet based NTP time servers are used as reference clocks. External NTP servers are specified using the 'server' command along with the IP address or domain name of the server. Multiple external time servers can be specified in the configuration file, which allows NTP to select the most appropriate server.
The NTP daemon is controlled by a series of scripts, which are used to start ('ntpd start'), stop ('ntp stop') or restart ('ntpd restart') the daemon. The NTP daemon can be queried and debugged using the 'ntpq' utility. This is a very useful utility for debugging NTP server installations. It provides information relating to the synchronisation status of the NTP daemon.
There are a number of security commands that can be specified in the configuration file to control access to the time server and also to provide authentication. You can easily configure NTP so that only a specified set of computers on a network can access the NTP server. This is achieved using the 'restrict' command, which is used in conjunction with the IP address or computer name of the computer to be allowed access. Multiple 'restrict' commands can be specified to restrict access to a range of computers. Authentication allows a matching set of keywords to be used on a server and client to authenticate the server. Shared keywords are specified in a 'ntp.keys' file on both the server and client computers. The keyword that are trusted and to be used for authentication purposes are then specified in the NTP daemon configuration file 'ntp.conf'.
To summarise, the NTP distribution is easy and free to obtain and easy to install, configure and debug. There is no reason why anyone with a little computer know-how cannot set up a local NTP time server for network time synchronisation.