Article Directory :: Computers & Technology Articles

Configuring NTP on your Linux Server

By David Evans

Subscribe to David Evans's RSS feed using any feed reader!

Republish: EasyPublish
Published: 23Mar2007
Word count: 712
Viewed: 417 time(s)
Bookmark this article using any bookmark manager!
Get Free Content For Your Site

The Network Time Protocol (NTP) defines a set of algorithms for the dissemination of time across the Internet. The NTP protocol can be used to synchronise the system time on your Linux Server with a highly accurate Internet time reference.

This article describes how to configure the Network Time Protocol (NTP) daemon on your Linux server to synchronise with an Internet based NTP server. It also provides a list of well-know public Internet time references.

Obtaining the NTP Source Code Distribution

The Linux NTP source code distribution is publicly available ‘open source' software. The distribution can be freely downloaded from the NTP web site ‘ntp.org'. The latest NTP version for Linux is 2.4.2. A port is also available for Windows platforms, but the primary development platform for NTP is the Linux operating system. A number of Linux based operating systems such as Mandrake and Redhat offer NTP as an installable RPM package.

Once download is complete, the NTP distribution should be configured and compiled on the host computer.

Configuration of the NTP Daemon

The NTP daemon is configured through entries in the primary NTP configuration file ‘ntp.conf'. The NTP configuration file contains a list of commands that instruct the daemon to synchronise with a specified NTP server. NTP servers are specified using the ‘server' command followed by the domain name of the server thus:

server ntp2c.mcc.ac.uk
server ntp.cis.strath.ac.uk

A number of access control options are also available to restrict the use of your NTP server by network time clients. To only allow machines on your own network to synchronize with the server use:

restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

Alternatively, you can restrict all access to your NTP server with the following command:

restrict default ignore

Multiple directives can be specified to restrict access to a specified range of computers.

Using NTP Authentication

NTP authentication is used by time clients to authenticate the time server to prevent rogue server intervention. NTP authentication is based on encrypted keys. A key is encrypted and sent to the client by the server, where it is unencrypted and checked against the client key to ensure a match.

NTP keys are stored in the ‘ntp.keys' file in the following format:

Key-number M Key (The M stands for MD5 encryption), e.g.:

1 M secret
5 M RaBBit
7 M TiMeLy
10 M MYKEY

The NTP configuration file ‘ntp.conf' specifies which of the keys are trusted. Any keys specified in the keys file but not trusted will not be used for authentication, e.g.:

trustedkey 1 7 10

NTP Client Authentication Configuration

The NTP client also needs to be configured with similar authentication information as the server. The client may use a subset of the keys specified on the server. A different subset of keys can also be used on different clients, e.g.:

Client A) Client B)
1 M secret 1 M secret
7 M TiMeLy 5 M RaBBit

trustedkey 1 7 trustedkey 1


Controlling the NTP Server Daemon

Once configured, the NTP daemon can be controlled using the commands: ‘ntpd start'; ‘ntpd stop' and ‘ntpd restart'.

Querying the NTP Server Daemon

The NTP server daemon can be queried using the ‘ntpq –p' command. The ntpq command queries the NTP server for synchronisation status and provides a list of servers with synchronisation information for each server.

Public Internet NTP Servers

Public NTP servers provide subscription free, highly accurate, timing references for computer time synchronisation. Below is a list of popular public NTP time servers.

Stratum 1 Public NTP Servers
chronos.csr.net - 194.35.252.7 - Computing Systems Research Ltd. United Kingdom - NTP V4 primary (Odetics GPS), Sun/Sparc Solaris 2.6
ntp.my-inbox.co.uk - 81.168.77.149 - Falmouth, Cornwall, UK - NTP V4.2.0 primary (MSF Radio Clock Receiver), Trustix Linux

Stratum 2 Public NTP Servers
ntp2.sandvika.net - 194.164.127.6 - Telehouse Europe, London E14 - NTP V4 secondary Sun UltraSPARC Solaris 8
ntp2d.mcc.ac.uk - 130.88.203.12 - University of Manchester, Manchester, England - NTP secondary (S2), SGI/Irix
ntp2c.mcc.ac.uk - 130.88.200.4 - University of Manchester, Manchester, England - NTP secondary (S2), PC/FreeBSD
ntp.exnet.com - 194.207.34.9 - ExNet Ltd, London, UK - NTP secondary (stratum 2), Sun-4/Unix
audaxsystems.co.uk - 193.201.200.83 - Interhouse London E14 - NTP V4, SuSE 9.0 (Stratum 1)
ntp1.sandvika.net - 194.164.127.5 - Telehouse Europe, London E14 - NTP V4 secondary Sun UltraSPARC Solaris 8
ntp.cis.strath.ac.uk - University of Strathclyde, Glasgow, Scotland - NTP V4 secondary
ntp0.sandvika.net - 194.164.127.4 - Telehouse Europe, London E14 - NTP V4 secondary Sun UltraSPARC Solaris 8

David Evans is a technical author that specialises in Linux NTP Server synchronisation systems. Click here to find out more about Linux NTP Server systems.

Bookmark this article using any bookmark manager! Subscribe to David Evans's RSS feed using any feed reader!

EasyPublish™ this article - publishers click here

More articles by David Evans

Free Report!
Ten Essential Secrets Of Article Marketing ... Grab Your Free
Copy
Now:




We respect your privacy.


Need Content?
Regular Top Quality Content for your Blog, Ezine or Website ...
Delivered Direct,
For Free!

Click For Details



Arts & Entertainment
Automotive
Business - General
Computers & Technology
Finance & Investment
Food & Drink
Health & Fitness
Home & Family
Internet Marketing/Online Business
Legal
Pets & Animals
Politics & Government
Reference & Education
Religion & Faith
Self-Improvement/Motivation
Social
Sports & Recreation
Travel & Leisure
Writing & Speaking

More computing articles:

  • What Do I Have To Do To Get A Web Host Around Here? (Hanson Raider)
    At one time or another we have all had an idea we thought would be profitable and web site worthy. We all have different interests and view-points of these interests that make them unique to us as individuals. But it can be said that many people today are like minded in the broader sense of the term and they would all benefit greatly from having a place to discuss their niche topics.

  • How A Crater In Yucatan Killed The Dinosaurs (Robert Nickel)
    Everyone knows that the dinosaurs all went extinct 65 million years ago, at the end of the Cretaceous Period. Fossil evidence shows mass extinctions all over the planet at roughly the same time; smaller mammal-like creatures were able to survive, eventually evolving into cats, dogs, and human beings. Modern scientific studies have concluded that the cause for this catastrophic event took place just off the coast of the Yucatan peninsula in Mexico

  • The True Measure of Deliverability (John Bollinger)
    An article discussing the concept of "deliverability" or "email deliverability" for email marketers today and the variety of factors that go into determining its effectiveness.

  • Learning More About the Best Place To Register A Domain Name (Hanson Raider)
    Many people have one basic question in mind; where do I register a domain name and how I do it. A lot of people think about which is the best place where they can get their domain registered; they have a lot of questions in mind such as whether they should register their domain with a company or a domain registrar that offers cheap services is a better choice for registering a domain name.

  • Top Cloud Hosting Is The New Choice For Every Business (Hanson Raider)
    Although cloud hosting is a recent phenomenon but all the companies are looking out for best cloud hosting service providers for the amount of benefits it has in store for everybody. The major reason for so many clients being attracted towards cloud hosting of top quality is its cheap cost.

  • Useful Things To Know About Bluehost Hosting (Hanson Raider)
    Before selecting any web hosting provider, there are a number of things you should keep in mind. Firstly, it would be good if you know about the company. Bluehost web hosting is one of the most well celebrated company in the field of web hosting. It is also one of the oldest web hosting companies. In recent times, Bluehost's packages have gone through major changes.

  • Why Shared Hosting Is Perfect For Beginners (Hanson Raider)
    Beginners will find the right hosting when they start looking at different shared hosting reviews of top companies. This allows the beginner to take advantage of lower prices while getting the necesssary hosting for their needs. You can take advantage of discounts from JustHost or another hosting company offering shared hosting if you look in the right places.

  • Where Did I Leave My Web Host (Hanson Raider)
    In this fast paced web surfing world we are left with little to be desired because of all of the many different web sites available to us for research, business, entertainment and even pleasure in some cases. These many varied web sites have become staples in our daily lives and without them most of us would be completely lost.

We Automatically Distribute Articles
To Thousands Of Publishers And Web Sites:

Submit Article
All content is viewed and used by you at your own risk and we do not warrant the accuracy or reliability of any of the information. The views expressed are those of the individual contributing authors and not necessarily those of this web site, or its owner, Takanomi Limited.
 
Copyright © 2012 Takanomi Ltd. Company no. 5629683. All rights reserved. | Privacy | Legal | Contact Information