<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OpenBSD and FreeBSD resources &#187; NTPD</title>
	<atom:link href="http://purebsd.com/tag/ntpd/feed" rel="self" type="application/rss+xml" />
	<link>http://purebsd.com</link>
	<description></description>
	<lastBuildDate>Tue, 01 Jun 2010 06:01:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Setting up NTPD</title>
		<link>http://purebsd.com/setting-up-ntpd.html</link>
		<comments>http://purebsd.com/setting-up-ntpd.html#comments</comments>
		<pubDate>Tue, 01 Jun 2010 05:03:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Daemons]]></category>
		<category><![CDATA[OpenBSD]]></category>
		<category><![CDATA[NTPD]]></category>
		<category><![CDATA[Setting up]]></category>

		<guid isPermaLink="false">http://purebsd.com/?p=37</guid>
		<description><![CDATA[Here I try to provide a guide to the succesful installation, configuration and usage of NTPD on OpenBSD. Install the ntp package: pkg_add ntp-4.1.1c.tgz pkg_add ntp-doc-4.1.1c.tgz The &#8220;doc&#8221; package is optional. It contains the documentation for the NTP daemon. Edit /etc/rc.conf.local to start the network time services automatically. Set &#8220;ntpdate_flags&#8221; to the IP address of a [...]]]></description>
			<content:encoded><![CDATA[<p>Here I try to provide a guide to the succesful installation, configuration and usage of NTPD on OpenBSD.</p>
<ol type="1">
<li>Install the ntp package:
<p><code> pkg_add ntp-4.1.1c.tgz<br />
pkg_add ntp-doc-4.1.1c.tgz<br />
</code><br />
The &#8220;doc&#8221; package is optional. It contains the documentation for the NTP daemon.</li>
<li>Edit <code>/etc/rc.conf.local</code> to start the network time services automatically.
<p>Set &#8220;ntpdate_flags&#8221; to the IP address of a NTP server, so that when the system boots, the local system clock is synchronized with that remote NTP server. This is a one time only action, only executed at system start.</p>
<p><code> ntpdate_flags="129.6.15.28" # for normal use: NTP server; run before ntpd starts<br />
</code><br />
Why? Well, if the difference of the local system&#8217;s time and the remote NTP server(s) time is greater than one hour, the local running NTPD won&#8217;t synchronize the local system&#8217;s time with the time of the remote NTP server(s).</p>
<p>Set &#8220;ntpd&#8221; to &#8220;YES&#8221; if you&#8217;d like to continuesly run a local NTP daemon, which synchronizes the local system&#8217;s time with the time offered by one or more remote NTP servers.</p>
<p><code> ntpd=YES # run ntpd if it exists<br />
</code></li>
<li>Create a directory where <code>ntpd</code> can store some files like <code>drift</code>:
<p><code> mkdir /etc/ntp<br />
</code></li>
<li>Create/edit the file <code>/etc/ntp.conf</code> to configure the workings of <code>ntpd</code>:
<p><code> # Keep it rather quiet<br />
logconfig =syncevents +allclock</p>
<p># Drift file. Put this in a directory which the daemon can write to.<br />
driftfile /etc/ntp/drift</p>
<p># Undisciplined Local Clock. This is a fake driver intended for backup<br />
# and when no outside source of synchronized time is available.<br />
server 127.127.1.0<br />
fudge 127.127.1.0 stratum 10</p>
<p># NTP servers from NIST for Atlantis<br />
server 129.6.15.28	iburst<br />
server 129.6.15.29	iburst</p>
<p># Do not allow anybody<br />
restrict default ignore</p>
<p># Do not peer with oneself<br />
restrict 127.0.0.1 mask 255.255.255.255 nopeer<br />
restrict 10.0.0.3 mask 255.255.255.255 nopeer<br />
restrict 192.168.0.3 mask 255.255.255.255 nopeer<br />
restrict 131.174.117.141 mask 255.255.255.255 nopeer</p>
<p># Allow NTP servers to inform us (-:<br />
restrict 129.6.15.28	mask 255.255.255.255<br />
restrict 129.6.15.29	mask 255.255.255.255<br />
</code><br />
For a more detailed working example, see my <a href="http://www.purebsd.com/ntp.conf.txt">ntp.conf file</a>.</li>
<li>Reboot the system to have the changes take effect. Alternately, you can execute
<p><code> /usr/local/sbin/ntpd -p /var/run/ntpd.pid<br />
</code><br />
to start the local NTP server.</li>
<li>Check <code>/var/log/daemon</code> if the NTP server was started succesfully.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://purebsd.com/setting-up-ntpd.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

