OpenNTPD
Encyclopedia
OpenNTPD is a Unix
system daemon
implementing the Network Time Protocol
to synchronize the local clock of a computer system with remote NTP servers. It is also able to act as an NTP server to NTP-compatible clients.
OpenNTPD is primarily developed by Henning Brauer as part of the OpenBSD
project. Its design goals include being secure (non-exploitable
), easy to configure, accurate enough for most purposes and with source code
that can be distributed under a BSD license. Its portable
version, like that of OpenSSH
, is developed as a child project which adds the portability code to the OpenBSD version and releases it separately. The portable version is developed by Darren Tucker. The most recent portable version released is not really up-to-date (one could say "is delayed"); it was released in 2006.
to mitigate the effects of possible security bugs exploiting the daemon through privilege escalation
. In order to simplify the use of NTP, OpenNTPD implements a smaller set of functionalities than those available in other NTP daemons, such as that provided by the Network Time Protocol Project. The objective is to provide enough features to satisfy typical usage at the risk of unsuitability for esoteric or niche requirements. OpenNTPD is configured through ntpd.conf configuration file. A minimal number of options are offered: IP address or hostname on which OpenNTPD should listen, a timedelta sensor device to be used, and the set of servers from which the time will be synchronized. The accuracy of OpenNTPD is best-effort; the daemon attempts to be as accurate as possible but no specific accuracy is guaranteed.
OpenNTPD has also been criticised for violating the NTP protocol by omitting correct information on the accuracy of transmitted data: OpenNTPD servers claim to be infinitely accurate (earlier versions claimed to be in stratum 1; while this particular issue has been fixed, OpenNTPD still serves time with a zero dispersion).
Shortly after the release of OpenNTPD 3.6, Brad Knowles wrote an article entitled OpenNTPd Considered Harmful criticizing various aspects of OpenNTPD, as well as the split development model that the project employs, which is also used in the development of OpenSSH
and OpenBGPD
. Darren Tucker, the main developer on the portable branch of OpenNTPD, wrote a detailed response to this article, discussing some of the issues addressed in the OpenNTPD 3.6.1 release and branding some of Knowles comments "quite misleading." Knowles' article also prompted the addition of a section to the OpenBSD networking FAQ explaining and rebutting its claims.
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...
system daemon
Daemon (computer software)
In Unix and other multitasking computer operating systems, a daemon is a computer program that runs as a background process, rather than being under the direct control of an interactive user...
implementing the Network Time Protocol
Network Time Protocol
The Network Time Protocol is a protocol and software implementation for synchronizing the clocks of computer systems over packet-switched, variable-latency data networks. Originally designed by David L...
to synchronize the local clock of a computer system with remote NTP servers. It is also able to act as an NTP server to NTP-compatible clients.
OpenNTPD is primarily developed by Henning Brauer as part of the OpenBSD
OpenBSD
OpenBSD is a Unix-like computer operating system descended from Berkeley Software Distribution , a Unix derivative developed at the University of California, Berkeley. It was forked from NetBSD by project leader Theo de Raadt in late 1995...
project. Its design goals include being secure (non-exploitable
Exploit (computer security)
An exploit is a piece of software, a chunk of data, or sequence of commands that takes advantage of a bug, glitch or vulnerability in order to cause unintended or unanticipated behavior to occur on computer software, hardware, or something electronic...
), easy to configure, accurate enough for most purposes and with source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...
that can be distributed under a BSD license. Its portable
Porting
In computer science, porting is the process of adapting software so that an executable program can be created for a computing environment that is different from the one for which it was originally designed...
version, like that of OpenSSH
OpenSSH
OpenSSH is a set of computer programs providing encrypted communication sessions over a computer network using the SSH protocol...
, is developed as a child project which adds the portability code to the OpenBSD version and releases it separately. The portable version is developed by Darren Tucker. The most recent portable version released is not really up-to-date (one could say "is delayed"); it was released in 2006.
History
The development of OpenNTPD was motivated by a combination of issues with current NTP daemons: difficult configuration, complicated and difficult to audit code, and unsuitable licensing. OpenNTPD was designed to solve these problems and make time synchronization accessible to a wider userbase. After a period of development, OpenNTPD first appeared in OpenBSD 3.6. Its first release was announced on November 2, 2004.Goals
OpenNTPD is an attempt by the OpenBSD team to produce an NTP daemon implementation that is secure, simple to security audit, trivial to set up and administer, and has small memory requirement that synchronizes local clock on the computer with remote NTP server with reasonable accuracy. As such, the design goals for OpenNTPD are: security, ease of use, and performance. Security in OpenNTPD is achieved by robust validity check in the network input path, use of bounded buffer operations via strlcpy, and privilege separationPrivilege separation
In computer programming and computer security, privilege separation is a technique in which a program is divided into parts which are limited to the specific privileges they require in order to perform a specific task...
to mitigate the effects of possible security bugs exploiting the daemon through privilege escalation
Privilege escalation
Privilege escalation is the act of exploiting a bug, design flaw or configuration oversight in an operating system or software application to gain elevated access to resources that are normally protected from an application or user...
. In order to simplify the use of NTP, OpenNTPD implements a smaller set of functionalities than those available in other NTP daemons, such as that provided by the Network Time Protocol Project. The objective is to provide enough features to satisfy typical usage at the risk of unsuitability for esoteric or niche requirements. OpenNTPD is configured through ntpd.conf configuration file. A minimal number of options are offered: IP address or hostname on which OpenNTPD should listen, a timedelta sensor device to be used, and the set of servers from which the time will be synchronized. The accuracy of OpenNTPD is best-effort; the daemon attempts to be as accurate as possible but no specific accuracy is guaranteed.
Example
OpenNTPD gradually adjusts the system clock, as seen here in the example output of OpenNTPD running on a 64-bit Arch Linux system,
[root@nikolai karam]# more /var/log/daemon.log | grep ntp | grep adjusting | tail -20
Aug 4 02:58:21 nikolai ntpd[4784]: adjusting local clock by -2.134620s
Aug 4 03:02:38 nikolai ntpd[4784]: adjusting local clock by -1.983869s
Aug 4 03:06:53 nikolai ntpd[4784]: adjusting local clock by -1.884521s
Aug 4 03:08:28 nikolai ntpd[4784]: adjusting local clock by -1.819296s
Aug 4 03:12:46 nikolai ntpd[4784]: adjusting local clock by -1.712934s
Aug 4 03:15:48 nikolai ntpd[4784]: adjusting local clock by -1.607747s
Aug 4 03:19:31 nikolai ntpd[4784]: adjusting local clock by -1.535188s
Aug 4 03:21:05 nikolai ntpd[4784]: adjusting local clock by -1.439628s
Aug 4 03:24:56 nikolai ntpd[4784]: adjusting local clock by -1.376086s
Aug 4 03:29:12 nikolai ntpd[4784]: adjusting local clock by -1.271529s
Aug 4 03:32:20 nikolai ntpd[4784]: adjusting local clock by -1.162333s
Aug 4 03:36:08 nikolai ntpd[4784]: adjusting local clock by -1.023899s
Aug 4 03:40:02 nikolai ntpd[4784]: adjusting local clock by -0.902637s
Aug 4 03:43:43 nikolai ntpd[4784]: adjusting local clock by -0.789431s
Aug 4 03:47:35 nikolai ntpd[4784]: adjusting local clock by -0.679320s
Aug 4 03:50:45 nikolai ntpd[4784]: adjusting local clock by -0.605858s
Aug 4 03:53:31 nikolai ntpd[4784]: adjusting local clock by -0.529821s
Aug 4 03:56:33 nikolai ntpd[4784]: adjusting local clock by -0.429573s
Aug 4 03:59:46 nikolai ntpd[4784]: adjusting local clock by -0.312575s
Aug 4 04:03:14 nikolai ntpd[4784]: adjusting local clock by -0.232646s
[root@nikolai karam]#
Criticism
OpenNTPD has been criticized as being less accurate than the NTP daemon produced by the Network Time Protocol Project. While the OpenNTPD project admits the plausibility of this claim, it claims this as a trade-off between microsecond precision and the benefits of simplicity and security OpenNTPD offers.OpenNTPD has also been criticised for violating the NTP protocol by omitting correct information on the accuracy of transmitted data: OpenNTPD servers claim to be infinitely accurate (earlier versions claimed to be in stratum 1; while this particular issue has been fixed, OpenNTPD still serves time with a zero dispersion).
Shortly after the release of OpenNTPD 3.6, Brad Knowles wrote an article entitled OpenNTPd Considered Harmful criticizing various aspects of OpenNTPD, as well as the split development model that the project employs, which is also used in the development of OpenSSH
OpenSSH
OpenSSH is a set of computer programs providing encrypted communication sessions over a computer network using the SSH protocol...
and OpenBGPD
OpenBGPD
OpenBGPD allows general purpose computers to be used as routers. It is a Unix system daemon that provides a free, open-source implementation of the Border Gateway Protocol version 4. This allows a machine to exchange routes with other systems that speak BGP....
. Darren Tucker, the main developer on the portable branch of OpenNTPD, wrote a detailed response to this article, discussing some of the issues addressed in the OpenNTPD 3.6.1 release and branding some of Knowles comments "quite misleading." Knowles' article also prompted the addition of a section to the OpenBSD networking FAQ explaining and rebutting its claims.