1*2b15cb3dSCy Schubert<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2*2b15cb3dSCy Schubert<html> 3*2b15cb3dSCy Schubert<head> 4*2b15cb3dSCy Schubert<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> 5*2b15cb3dSCy Schubert<meta name="generator" content="HTML Tidy, see www.w3.org"> 6*2b15cb3dSCy Schubert<title>Access Control Support</title> 7*2b15cb3dSCy Schubert<link href="scripts/style.css" type="text/css" rel="stylesheet"> 8*2b15cb3dSCy Schubert<style type="text/css"> 9*2b15cb3dSCy Schubert<!-- 10*2b15cb3dSCy Schubert<style1 { 11*2b15cb3dSCy Schubertcolor: #FF0000; 12*2b15cb3dSCy Schubert font-weight: bold; 13*2b15cb3dSCy Schubert} 14*2b15cb3dSCy Schubert--> 15*2b15cb3dSCy Schubert</style> 16*2b15cb3dSCy Schubert</head> 17*2b15cb3dSCy Schubert<body> 18*2b15cb3dSCy Schubert<h3>Access Control Support</h3> 19*2b15cb3dSCy Schubert<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*2b15cb3dSCy Schubert<p>The skunk watches for intruders and sprays.</p> 21*2b15cb3dSCy Schubert<p>Last update: 22*2b15cb3dSCy Schubert <!-- #BeginDate format:En2m -->11-Sep-2010 05:53<!-- #EndDate --> 23*2b15cb3dSCy Schubert UTC</p> 24*2b15cb3dSCy Schubert<br clear="left"> 25*2b15cb3dSCy Schubert<h4>Related Links</h4> 26*2b15cb3dSCy Schubert<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script> 27*2b15cb3dSCy Schubert<script type="text/javascript" language="javascript" src="scripts/command.txt"></script> 28*2b15cb3dSCy Schubert<script type="text/javascript" language="javascript" src="scripts/accopt.txt"></script> 29*2b15cb3dSCy Schubert<hr> 30*2b15cb3dSCy Schubert<h4>Access Control Support</h4> 31*2b15cb3dSCy Schubert<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*2b15cb3dSCy Schubert<p>The ACL is specified as a list of <tt>restrict</tt> commands in the following format:</p> 33*2b15cb3dSCy Schubert<p><tt>restrict <i>address</i> [mask <i>mask</i>] [<i>flag</i>][...]</tt></p> 34*2b15cb3dSCy Schubert<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*2b15cb3dSCy Schubert<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*2b15cb3dSCy Schubert<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*2b15cb3dSCy Schubert<pre> 38*2b15cb3dSCy Schubertrestrict default nopeer # deny new associations 39*2b15cb3dSCy Schubertrestrict 128.175.0.0 mask 255.255.0.0 # allow campus access 40*2b15cb3dSCy Schubertrestrict 128.4.0.0 mask 255.255.0.0 none # allow ECE and CIS access 41*2b15cb3dSCy Schubertrestrict 128.4.1.0 mask 255.255.255.0 notrust # require authentication on subnet 1 42*2b15cb3dSCy Schubertrestrict time.nist.gov # allow access 43*2b15cb3dSCy Schubert</pre> 44*2b15cb3dSCy Schubert<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*2b15cb3dSCy Schubert<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*2b15cb3dSCy Schubert<hr> 47*2b15cb3dSCy Schubert<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script> 48*2b15cb3dSCy Schubert</body> 49*2b15cb3dSCy Schubert</html> 50*2b15cb3dSCy Schubert</html> 51