1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3<head> 4<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> 5<meta name="generator" content="HTML Tidy, see www.w3.org"> 6<title>Access Control Support</title> 7<link href="scripts/style.css" type="text/css" rel="stylesheet"> 8<style type="text/css"> 9<!-- 10<style1 { 11color: #FF0000; 12 font-weight: bold; 13} 14--> 15</style> 16</head> 17<body> 18<h3>Access Control Support</h3> 19<p><img src="pic/pogo6.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a></p> 20<p>The skunk watches for intruders and sprays.</p> 21<p>Last update: 22 <!-- #BeginDate format:En2m -->26-Jul-2017 20:10<!-- #EndDate --> 23 UTC</p> 24<br clear="left"> 25<h4>Related Links</h4> 26<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script> 27<script type="text/javascript" language="javascript" src="scripts/command.txt"></script> 28<script type="text/javascript" language="javascript" src="scripts/accopt.txt"></script> 29<hr> 30<h4>Access Control Support</h4> 31<p>The <tt>ntpd</tt> daemon implements a general purpose access control list (ACL) containing address/match entries sorted first by increasing address values and then by increasing mask values. A match occurs when the bitwise AND of the mask and the packet source address is equal to the bitwise AND of the mask and address in the list. The list is searched in order with the last match found defining the restriction flags associated with the entry.</p> 32<p>The ACL is specified as a list of <tt>restrict</tt> commands in the following format:</p> 33<p><tt>restrict <i>address</i> [mask <i>mask</i>] [<i>flag</i>][...]</tt></p> 34<p>The <tt><i>address</i></tt> argument expressed in dotted-quad form is the address of a host or network. Alternatively, the <tt><i>address</i></tt> argument can be a valid host DNS name. The <tt><i>mask</i></tt> argument expressed in IPv4 or IPv6 numeric address form defaults to all mask bits on, meaning that the <tt><i>address</i></tt> is treated as the address of an individual host. A default entry (address 0.0.0.0, mask 0.0.0.0 for IPv4 and address :: mask :: for IPv6) is always the first entry in the list. <tt>restrict default</tt>, with no mask option, modifies both IPv4 and IPv6 default entries. <tt>restrict source</tt> configures a template restriction automatically added at runtime for each association, whether configured, ephemeral, or preemptable, and removed when the association is demobilized.</p> 35<p>Some flags have the effect to deny service, some have the effect to enable service and some are conditioned by other flags. The flags are not orthogonal, in that more restrictive flags will often make less restrictive ones redundant. The flags that deny service are classed in two categories, those that restrict time service and those that restrict informational queries and attempts to do run-time reconfiguration of the server.</p> 36<p>An example may clarify how it works. Our campus has two class-B networks, 128.4 for the ECE and CIS departments and 128.175 for the rest of campus. Let's assume (not true!) that subnet 128.4.1 homes critical services like class rosters and spread sheets. A suitable ACL might look like this:</p> 37<pre> 38restrict default nopeer # deny new associations 39restrict 128.175.0.0 mask 255.255.0.0 # allow campus access 40restrict 128.4.0.0 mask 255.255.0.0 none # allow ECE and CIS access 41restrict 128.4.1.0 mask 255.255.255.0 notrust # require authentication on subnet 1 42restrict time.nist.gov # allow access 43</pre> 44<p>While this facility may be useful for keeping unwanted, broken or malicious clients from congesting innocent servers, it should not be considered an alternative to the NTP authentication facilities. Source address based restrictions are easily circumvented by a determined cracker.</p> 45<p>Default restriction list entries with the flags <tt>ignore, ntpport</tt>, for each of the local host's interface addresses are inserted into the table at startup to prevent the server from attempting to synchronize to its own time. A default entry is also always present, though if it is otherwise unconfigured; no flags are associated with the default entry (i.e., everything besides your own NTP server is unrestricted).</p> 46<hr> 47<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script> 48</body> 49</html> 50</html> 51