http://bering-uclibc.zetam.org/index.php?title=Bering-uClibc_6.x_-_User_Guide_-_Basic_Configuration_-_Setup_a_small_timeserver&feed=atom&action=history
Bering-uClibc 6.x - User Guide - Basic Configuration - Setup a small timeserver - Revision history
2024-03-29T07:50:42Z
Revision history for this page on the wiki
MediaWiki 1.26.0
http://bering-uclibc.zetam.org/index.php?title=Bering-uClibc_6.x_-_User_Guide_-_Basic_Configuration_-_Setup_a_small_timeserver&diff=2613&oldid=prev
Kapeka at 16:51, 1 May 2016
2016-05-01T16:51:40Z
<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 16:51, 1 May 2016</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l4" >Line 4:</td>
<td colspan="2" class="diff-lineno">Line 4:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>| width="20%" align="left"  | [[Bering-uClibc 6.x - User Guide - Basic Configuration - Email Alerts|Prev]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>| width="20%" align="left"  | [[Bering-uClibc 6.x - User Guide - Basic Configuration - Email Alerts|Prev]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>! width="60%" align="center" | [[Bering-uClibc 6.x - User Guide]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>! width="60%" align="center" | [[Bering-uClibc 6.x - User Guide]]</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>| width="20%" align="right"  | [[Bering-uClibc 6.x - User Guide - Basic Configuration - Using <del class="diffchange diffchange-inline">Dropbear </del>- a small SSH replacement|Next]]</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>| width="20%" align="right"  | [[Bering-uClibc 6.x - User Guide - Basic Configuration - Using <ins class="diffchange diffchange-inline">dropbear </ins>- a small SSH replacement|Next]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>----</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>----</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l77" >Line 77:</td>
<td colspan="2" class="diff-lineno">Line 77:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>| width="40%" align="left"  | [[Bering-uClibc 6.x - User Guide - Basic Configuration - Email Alerts|Prev]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>| width="40%" align="left"  | [[Bering-uClibc 6.x - User Guide - Basic Configuration - Email Alerts|Prev]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>| width="20%" align="center" | [[Bering-uClibc 6.x - User Guide - Basic Configuration|Up]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>| width="20%" align="center" | [[Bering-uClibc 6.x - User Guide - Basic Configuration|Up]]</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>| width="40%" align="right"  | [[Bering-uClibc 6.x - User Guide - Basic Configuration - Using <del class="diffchange diffchange-inline">Dropbear </del>- a small SSH replacement|Next]]</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>| width="40%" align="right"  | [[Bering-uClibc 6.x - User Guide - Basic Configuration - Using <ins class="diffchange diffchange-inline">dropbear </ins>- a small SSH replacement|Next]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Bering-uClibc 6.x]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Bering-uClibc 6.x]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category:User Guide]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category:User Guide]]</div></td></tr>
</table>
Kapeka
http://bering-uclibc.zetam.org/index.php?title=Bering-uClibc_6.x_-_User_Guide_-_Basic_Configuration_-_Setup_a_small_timeserver&diff=2611&oldid=prev
Kapeka: Created page with "{| summary="Navigation header" width="100%" ! colspan="3" align="center" | Bering-uClibc 6.x - User Guide - Basic Configuration - Setup a small timeserver|Basic Configuratio..."
2016-05-01T16:24:19Z
<p>Created page with "{| summary="Navigation header" width="100%" ! colspan="3" align="center" | Bering-uClibc 6.x - User Guide - Basic Configuration - Setup a small timeserver|Basic Configuratio..."</p>
<p><b>New page</b></p><div>{| summary="Navigation header" width="100%"<br />
! colspan="3" align="center" | [[Bering-uClibc 6.x - User Guide - Basic Configuration - Setup a small timeserver|Basic Configuration - Setup a small timeserver]]<br />
|-<br />
| width="20%" align="left" | [[Bering-uClibc 6.x - User Guide - Basic Configuration - Email Alerts|Prev]]<br />
! width="60%" align="center" | [[Bering-uClibc 6.x - User Guide]]<br />
| width="20%" align="right" | [[Bering-uClibc 6.x - User Guide - Basic Configuration - Using Dropbear - a small SSH replacement|Next]]<br />
|}<br />
----<br />
==Objective==<br />
It is important on routers and firewalls to have the exact time. <br />
It starts while reviewing your log files and ends with some applications<br />
that won't even start properly without having the correct time (e.g. openvpn).<br />
<br />
This instructions explain, how to make shure, you have the exact time (UTC)<br />
on your router and to optionally act as a timeserver for the local net. We<br />
use by default the busybox applet <code class="filename">ntpd</code> to achieve that goals, though you can replace it with a package providing the full-fledged ntp from [http://ntp.org ntp.org] (<code class="filename">ntp.lrp</code>).<br />
<br />
The busybox <code class="filename">ntpd</code> applet is part of the core and already installed after you boot<br />
your router. If enabled (see below), it sets the time with the information provided by<br />
two upstream servers and listen on all ports to serve clients in your LAN<br />
with the correct time.<br />
<br />
==Installation==<br />
The binary <code class="filename">ntpd</code> is part of the default distribution and already installed. <br />
To make use <code class="filename">ntpd</code> you have to make shure that the Package <code class="filename">bbntpd.lrp</code> is loaded (through <code class="filename">leaf.cfg</code>).<br />
<code class="filename">bbntpd.lrp</code> provides the init script, that starts <code class="filename">ntpd</code> and the configuration file.<br />
<br />
==Configuring ntpd==<br />
<br />
<code class="filename">/etc/default/ntpd</code> is the only configuration file you need to touch - you<br />
can add more upstream servers and en/disable ntpd as timeserver for your LAN,<br />
or preventing to run the ntpd applet at all. The latter is important, if<br />
you want to use the full-fledged <code class="filename">ntp.lrp</code> Package.<br />
<br />
To enable ntpd change<br />
NTPDRUN="no"<br />
to<br />
NTPDRUN="yes"<br />
<br />
With NTPDOPTS you can change the way ntpd works.<br />
<br />
The option "-l" activates ntpd to act as timeserver for your LAN.<br />
If don't need that, just remove "-l" from NTPDOPTS.<br />
<br />
To get the exact time, you have to synchronize with peers from a group of<br />
so-called stratum 2 timeservers. A good place to start is the pool at<br />
pool.ntp.org (see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers). <br />
The default settings calls at least two peers from the pool.<br />
Each peer is added with the "-p" option followed by a number from<br />
pool.ntp.org. (e.g. 0.pool.ntp.org, 1.pool.ntp.org) You can add as much<br />
peers as you want. Though the default should work sufficiently.<br />
<br />
==Open your firewall for time services==<br />
ntpd needs open ports for ntp from the firewall to the net, to sync<br />
your router with the peers on the net, and to allow a<br />
connection from your LAN clients to your timeserver on the router.<br />
The first one is open by default with recent versions of Bering-uClibc, to<br />
allow access from the LAN to the firewall/router you have to outcomment the<br />
according entry in <code class="filename">/etc/shorewall/rules</code>.<br />
<br />
# timeserver (allow syncing with time servers (default: pool.ntp.org))<br />
NTP(ACCEPT) fw net<br />
# timeserver (allow LAN clients to sync with the time service on this<br />
machine) )<br />
# NTP(ACCEPT) loc fw<br />
<br />
==Further readings==<br />
For more information see:<br />
<br />
[http://ntp.org ntp.org] - the home of the Network Time Protocol project with an extensive<br />
documentation.<br />
<br />
The [http://www.ntp.org/ntpfaq/NTP-a-faq.htm NTP FAQ and HOWTO] - "A first try on a non-technical Mini-HOWTO and FAQ on NTP"<br />
<br />
----<br />
{| summary="Navigation footer" width="100%"<br />
| width="40%" align="left" | [[Bering-uClibc 6.x - User Guide - Basic Configuration - Email Alerts|Prev]]<br />
| width="20%" align="center" | [[Bering-uClibc 6.x - User Guide - Basic Configuration|Up]]<br />
| width="40%" align="right" | [[Bering-uClibc 6.x - User Guide - Basic Configuration - Using Dropbear - a small SSH replacement|Next]]<br />
|}<br />
<br />
[[Category:Bering-uClibc 6.x]]<br />
[[Category:User Guide]]</div>
Kapeka