<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Linux%2FNTP</id>
	<title>Linux/NTP - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=Linux%2FNTP"/>
	<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Linux/NTP&amp;action=history"/>
	<updated>2026-06-20T18:19:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.12</generator>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=Linux/NTP&amp;diff=9486&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;NTP = network time protocol  =Why It Is Important=  The &quot;it&quot; here refers to two things - time, and the time server.  ==Why Time Is Important==  Timing is important to many Lin...&quot;</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=Linux/NTP&amp;diff=9486&amp;oldid=prev"/>
		<updated>2016-03-15T00:05:16Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;NTP = network time protocol  =Why It Is Important=  The &amp;quot;it&amp;quot; here refers to two things - time, and the time server.  ==Why Time Is Important==  Timing is important to many Lin...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;NTP = network time protocol&lt;br /&gt;
&lt;br /&gt;
=Why It Is Important=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;it&amp;quot; here refers to two things - time, and the time server.&lt;br /&gt;
&lt;br /&gt;
==Why Time Is Important==&lt;br /&gt;
&lt;br /&gt;
Timing is important to many Linux functions, like DHCP leases or file synchronization. &lt;br /&gt;
&lt;br /&gt;
==Why Time Server Is Important==&lt;br /&gt;
&lt;br /&gt;
If you are running a large network with hundreds of computers, each of those computers will be looking for a network time protocol server. If they don&amp;#039;t find one, each of those computers will go to a public time server and ask for the time. So it is a courtesy to set up your own network time server, and ask a public server for the time once and only once for your entire network.&lt;br /&gt;
&lt;br /&gt;
=Set Up NTP=&lt;br /&gt;
&lt;br /&gt;
==Install==&lt;br /&gt;
&lt;br /&gt;
To install a network time protocol server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ apt-get install ntp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now start the ntp daemon:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ systemctl start ntpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Configure==&lt;br /&gt;
&lt;br /&gt;
To configure NTP, you will modify &amp;lt;code&amp;gt;/etc/ntp.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the addresses of some public time servers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server 0.north-america.pool.ntp.org&lt;br /&gt;
server 1.north-america.pool.ntp.org&lt;br /&gt;
server 2.north-america.pool.ntp.org&lt;br /&gt;
server 3.north-america.pool.ntp.org&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restrict the DNS configuration so no users on certain subnets can modify it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
restrict 10.10.96.0 mask 255.255.252.0 nomodify notrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also add a log file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
logfile /var/log/ntp.log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check this file if there are any issues with the NTP.&lt;br /&gt;
&lt;br /&gt;
If you have a firewall, be sure and add a rule to let NTP traffic through. Alternatively, you can open port 123.&lt;br /&gt;
&lt;br /&gt;
==View==&lt;br /&gt;
&lt;br /&gt;
To see information about the time server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ntpq -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is info about what the output means:&lt;br /&gt;
* Remote column - the name of any remote NTP server&lt;br /&gt;
* Refid column - the IP of the remote machine&lt;br /&gt;
* St column - stratum, which is a measure of how close the time server is to you (physically)&lt;br /&gt;
* When column - shows how many seconds ago the server was polled&lt;br /&gt;
* Poll column - polling frequency&lt;br /&gt;
* Reach - whether the time server was reached in the last 8 attempts (377 means yes to all 8 attempts)&lt;br /&gt;
* Delay - delay time in ms of the time server&lt;br /&gt;
* Offset - difference between local and remote clock&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have set up a network time server, it will take as long as 30 minutes for computers on the network to start to see it. To verify the time server is synchronizing correctly with the network time server you set up, run the above command on a system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ntpq -p&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If everything is working correctly, it should list 10.10.99.X (or whatever IP address the time server is at).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Related=&lt;br /&gt;
&lt;br /&gt;
See [[Template:LinuxNetworkingFlag]]&lt;br /&gt;
&lt;br /&gt;
{{LinuxNetworkingFlag}}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>