⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 network-inetd.html

📁 FreeBSD操作系统的详细使用手册
💻 HTML
📖 第 1 页 / 共 2 页
字号:
ftp     stream  tcp     nowait  root    /usr/libexec/ftpd       ftpd -l</pre><div class="VARIABLELIST"><dl><dt>service-name</dt><dd><p>This is the service name of the particular daemon. It must correspond to a servicelisted in <tt class="FILENAME">/etc/services</tt>. This determines which port <bclass="APPLICATION">inetd</b> must listen to. If a new service is being created, it mustbe placed in <tt class="FILENAME">/etc/services</tt> first.</p></dd><dt>socket-type</dt><dd><p>Either <var class="LITERAL">stream</var>, <var class="LITERAL">dgram</var>, <varclass="LITERAL">raw</var>, or <var class="LITERAL">seqpacket</var>. <varclass="LITERAL">stream</var> must be used for connection-based, TCP daemons, while <varclass="LITERAL">dgram</var> is used for daemons utilizing the <acronymclass="ACRONYM">UDP</acronym> transport protocol.</p></dd><dt>protocol</dt><dd><p>One of the following:</p><div class="INFORMALTABLE"><a id="AEN33306" name="AEN33306"></a><table border="0" frame="void" class="CALSTABLE"><col /><col /><thead><tr><th>Protocol</th><th>Explanation</th></tr></thead><tbody><tr><td>tcp, tcp4</td><td>TCP IPv4</td></tr><tr><td>udp, udp4</td><td>UDP IPv4</td></tr><tr><td>tcp6</td><td>TCP IPv6</td></tr><tr><td>udp6</td><td>UDP IPv6</td></tr><tr><td>tcp46</td><td>Both TCP IPv4 and v6</td></tr><tr><td>udp46</td><td>Both UDP IPv4 and v6</td></tr></tbody></table></div></dd><dt>{wait|nowait}[/max-child[/max-connections-per-ip-per-minute]]</dt><dd><p><var class="OPTION">wait|nowait</var> indicates whether the daemon invoked from <bclass="APPLICATION">inetd</b> is able to handle its own socket or not. <varclass="OPTION">dgram</var> socket types must use the <var class="OPTION">wait</var>option, while stream socket daemons, which are usually multi-threaded, should use <varclass="OPTION">nowait</var>. <var class="OPTION">wait</var> usually hands off multiplesockets to a single daemon, while <var class="OPTION">nowait</var> spawns a child daemonfor each new socket.</p><p>The maximum number of child daemons <b class="APPLICATION">inetd</b> may spawn can beset using the <var class="OPTION">max-child</var> option. If a limit of ten instances ofa particular daemon is needed, a <var class="LITERAL">/10</var> would be placed after<var class="OPTION">nowait</var>.</p><p>In addition to <var class="OPTION">max-child</var>, another option limiting themaximum connections from a single place to a particular daemon can be enabled. <varclass="OPTION">max-connections-per-ip-per-minute</var> does just this. A value of tenhere would limit any particular IP address connecting to a particular service to tenattempts per minute. This is useful to prevent intentional or unintentional resourceconsumption and Denial of Service (DoS) attacks to a machine.</p><p>In this field, <var class="OPTION">wait</var> or <var class="OPTION">nowait</var> ismandatory. <var class="OPTION">max-child</var> and <varclass="OPTION">max-connections-per-ip-per-minute</var> are optional.</p><p>A stream-type multi-threaded daemon without any <var class="OPTION">max-child</var> or<var class="OPTION">max-connections-per-ip-per-minute</var> limits would simply be: <varclass="LITERAL">nowait</var>.</p><p>The same daemon with a maximum limit of ten daemons would read: <varclass="LITERAL">nowait/10</var>.</p><p>Additionally, the same setup with a limit of twenty connections per IP address perminute and a maximum total limit of ten child daemons would read: <varclass="LITERAL">nowait/10/20</var>.</p><p>These options are all utilized by the default settings of the <bclass="APPLICATION">fingerd</b> daemon, as seen here:</p><pre class="PROGRAMLISTING">finger stream  tcp     nowait/3/10 nobody /usr/libexec/fingerd fingerd -s</pre></dd><dt>user</dt><dd><p>This is the username that the particular daemon should run as. Most commonly, daemonsrun as the <tt class="USERNAME">root</tt> user. For security purposes, it is common tofind some servers running as the <tt class="USERNAME">daemon</tt> user, or the leastprivileged <tt class="USERNAME">nobody</tt> user.</p></dd><dt>server-program</dt><dd><p>The full path of the daemon to be executed when a connection is received. If thedaemon is a service provided by <b class="APPLICATION">inetd</b> internally, then <varclass="OPTION">internal</var> should be used.</p></dd><dt>server-program-arguments</dt><dd><p>This works in conjunction with <var class="OPTION">server-program</var> by specifyingthe arguments, starting with <var class="LITERAL">argv[0]</var>, passed to the daemon oninvocation. If <tt class="COMMAND">mydaemon -d</tt> is the command line, <varclass="LITERAL">mydaemon -d</var> would be the value of <varclass="OPTION">server-program-arguments</var>. Again, if the daemon is an internalservice, use <var class="OPTION">internal</var> here.</p></dd></dl></div></div><div class="SECT2"><h2 class="SECT2"><a id="NETWORK-INETD-SECURITY" name="NETWORK-INETD-SECURITY">23.2.5Security</a></h2><p>Depending on the security profile chosen at install, many of <bclass="APPLICATION">inetd</b>'s daemons may be enabled by default. If there is noapparent need for a particular daemon, disable it! Place a ``#'' in front of the daemonin question in <tt class="FILENAME">/etc/inetd.conf</tt>, and then send a <ahref="network-inetd.html#NETWORK-INETD-HANGUP">hangup signal to inetd</a>. Some daemons,such as <b class="APPLICATION">fingerd</b>, may not be desired at all because theyprovide an attacker with too much information.</p><p>Some daemons are not security-conscious and have long, or non-existent timeouts forconnection attempts. This allows an attacker to slowly send connections to a particulardaemon, thus saturating available resources. It may be a good idea to place <varclass="OPTION">max-connections-per-ip-per-minute</var> and <varclass="OPTION">max-child</var> limitations on certain daemons.</p><p>By default, TCP wrapping is turned on. Consult the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=hosts_access&sektion=5"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">hosts_access</span>(5)</span></a> manualpage for more information on placing TCP restrictions on various <bclass="APPLICATION">inetd</b> invoked daemons.</p></div><div class="SECT2"><h2 class="SECT2"><a id="NETWORK-INETD-MISC" name="NETWORK-INETD-MISC">23.2.6Miscellaneous</a></h2><p><b class="APPLICATION">daytime</b>, <b class="APPLICATION">time</b>, <bclass="APPLICATION">echo</b>, <b class="APPLICATION">discard</b>, <bclass="APPLICATION">chargen</b>, and <b class="APPLICATION">auth</b> are all internallyprovided services of <b class="APPLICATION">inetd</b>.</p><p>The <b class="APPLICATION">auth</b> service provides identity (<bclass="APPLICATION">ident</b>, <b class="APPLICATION">identd</b>) network services, andis configurable to a certain degree.</p><p>Consult the <a href="http://www.FreeBSD.org/cgi/man.cgi?query=inetd&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">inetd</span>(8)</span></a> manual pagefor more in-depth information.</p></div></div><div class="NAVFOOTER"><hr align="LEFT" width="100%" /><table summary="Footer navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><td width="33%" align="left" valign="top"><a href="network-servers.html"accesskey="P">Prev</a></td><td width="34%" align="center" valign="top"><a href="index.html"accesskey="H">Home</a></td><td width="33%" align="right" valign="top"><a href="network-nfs.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Network Servers</td><td width="34%" align="center" valign="top"><a href="network-servers.html"accesskey="U">Up</a></td><td width="33%" align="right" valign="top">Network File System (NFS)</td></tr></table></div><p align="center"><small>This, and other documents, can be downloaded from <ahref="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/</a>.</small></p><p align="center"><small>For questions about FreeBSD, read the <ahref="http://www.FreeBSD.org/docs.html">documentation</a> before contacting &#60;<ahref="mailto:questions@FreeBSD.org">questions@FreeBSD.org</a>&#62;.<br />For questions about this documentation, e-mail &#60;<ahref="mailto:doc@FreeBSD.org">doc@FreeBSD.org</a>&#62;.</small></p></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -