Network Time Protocol
Network Time Protocol
Network Time Protocol
NTP Topics
Introduction How It Works Suggested Deployments Installation & Configuration Examples Final Thoughts
Running Unix Apps Securely Unix Security Track
Introduction is a general overview of the Network Time Protocol including some historical perspectives. How It Works provides insight on how NTP runs in the Internet environment and introduces some terminology which will be used in the rest of the course. Suggested Deployments covers high-level architectural issues common to most enterprise NTP configurations. Installation and Configuration Examples includes not only actual NTP configuration files but also provides information on obtaining and building the Open Source version of NTP. Final Thoughts includes some parting shots and some useful URLs.
Introduction
How It Works
Global Architecture
NTP is distributed, hierarchical system Primary Servers are machines that are synchronized to external time sources Secondary Servers allow thousands of machines/organizations to synch without overloading primary servers
Terminology
Stratum -- How close a server is to a reliable source of time information
Stratum 1 hosts synch from atomic/GPS clocks (i.e., are primary servers) Stratum 16 hosts are disconnected
The stratum of a server is one plus the lowest stratum value of any server it is actively synching with
Running Unix Apps Securely Unix Security Track
In other words, if your host is synching against one stratum 1 server and two stratum 2 servers, then your host is a stratum 2 server. Stratum values are dynamic- if you suddenly lose connectivity to that stratum 1 server, then your stratum value will drop to 3. Generally speaking, hosts will prefer time synchronization information from lower stratum hosts.
10
Terminology (cont.)
Peer -- NTP peers share time info Server -- NTP server distributes time info, clients don't reciprocate Drift Ongoing report of inaccuracy of system clock
Running Unix Apps Securely Unix Security Track
NTP servers can either be configured in a peer-to-peer relationship or in a master/slave relationship. A peer relationship implies that both parties are aware of each others existence and have the other machine configured in their local NTP configuration file. However, in a master/slave relationship only the client configuration file needs to contain the server information, so the server may be unaware of the clients existence until the client actually requests time information from the server (pull rather than push). Clients who take time synchronization information from a server without notifying that servers administrator are generally referred to as clock suckers. xntpd keeps moment to moment statistics on how much average variance the local clock has from the time standard. This drift value is used to keep the system clock accurate in the event of a network partition that causes the host to lose time synch information. Once the drift value has been accurately estimated, xntpd is capable of keeping VERY accurate time even without external clock information.
11
Timing Attacks
An attacker may want to skew clocks by impersonating external NTP sources If you only synch time from one source then the attacker wins! Multiple external clock sources allow the NTP server to throw out bogus info
Running Unix Apps Securely Unix Security Track
One of the problems with your security depending upon time information from an external source is that a knowledgeable attacker may try to impersonate your external time source and skew your machine's clock. Success may allow the attacker to replay time-based security credentials against your infrastructure. NTP has built-in algorithms for detecting and ignoring obviously bogus time information. For these to be effective, however, your server must be receiving updates from more than one external clock source
12
13
Suggested Deployments
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Final Thoughts
31
32
Useful URLs
The root of all knowledge
http://www.ntp.org/
33