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

📄 816.html

📁 著名的linux英雄站点的文档打包
💻 HTML
📖 第 1 页 / 共 3 页
字号:
例2是defaults项的一个实例。从中看到对所有服务而言,登记消息将通过loca14.info有选择地送到syslogd进程。对成功的服务连接,将登记PID,客户机IP地址,中止状态和连接时间。对不成功的连接企图,将登记客户机IP地址。每项服务的最大实例数设置为8。禁止两项服务:in.tftpd和in.rexecd。 <br>
defaults项从本质上提供了在整个文件中建立某些属性的默认值,它应用于没有设置这些属性的所有服务。 <br>
例2 /etc/xinetd.conf中defaults项的示例 <br>
Defaults <br>
{ <br>
Log_type = SYSLOG loca14 info <br>
Log_on_success = PID HOST EXIT DURATION <br>
Log_on_failure = HOST <br>
Instances =8 <br>
Disabled = in.tftpd in.rexecd <br>
} <br>
<br>
注:如果在/etcxinetd.conf文件中没有defaults项,且之后决定增加这一项,你必须中止和重新启动xinetd以使defaults生效。这对任何要增加到/etc/xinetd.conf中的新服务也是正确的。它可以如下完成。 <br>
# kill-TERM xinetd <br>
#/ usr/sbin/xinetd <br>
或者如果使用了启动脚本,则只需要简单执行。 <br>
#/etc/rc.d/init.d/xinetd restart <br>
<br>
Servers项 servers特殊服务是实现提供当前运行在服务器上的进程表,以及有关这些进程的确切信息。换句话说,它提供了活动连接的列表。这对排除故障和检查xinetd状态是个有用机制。例3显示了/etc/xinetd.conf文件中的一个实例servers项。注意这项服务的类型是INTERNAL,UNLISTED,这意味着它是xinetd的内部功能,且不列在/etc/services中。使用的端口是完全任意的。 <br>
例3 servers项的示例 <br>
Service servers <br>
{ <br>
     type = INTERNAL UNLISTED <br>
     Socket_type = stream <br>
     Protocol = tcp <br>
     Port = 9997 <br>
     Wait = no <br>
     Only_from = 172.17.33.111 <br>
     Wait = no <br>
} <br>
注意这项服务仅用于特定IP地址172.17.33.111,它是服务器自身的IP地址。这表示不允许任何其他主机从这个服务器获得当前运行在服务器上的进程列表。这样做的原因是显而易见的:如果这条信息可被其他系统上的主机获取,基于对当前正在运行的进程的了解就加以利用。除用于调试之外,一般不要运行该服务,因为172.17.33.111上的任何用户通过执行例4中的telnet 172.17.33.111 9997都能获取这条信息。注意xinetd仅提供这条信息就退出,不提供交互连接。例4中的输出告诉我们有两个正在运行的telnet进程(第5行和第31行),一个进程PID为5931,另一个为5961(分别为第6行和第32行),有一个ftp进程(第18行),其运行PID为5960(第19行)。 <br>
例4 servers服务的输出示例 <br>
1 $ telnet topcat 9997 <br>
2 Trying 172.17.33.111…… <br>
3 Connected to topcat <br>
4 Escape character is ‘^]’ <br>
5 telnet server <br>
6 Pid=5931 <br>
7 Start_time=Sat Apr 17 10:32:15 1999 <br>
8 Connection info: <br>
9 State=CLOSED <br>
10 Service=telnet <br>
11 Descriptor=20 <br>
12 Flags=9 <br>
13 Remote_address=10.48.3.2,39958 <br>
14 Alternative services= <br>
15 Log_remote_user=YES <br>
16 Writes_to_log=YES <br>
17  <br>
18 ftp server <br>
19 Pid=5960 <br>
20 Start_time=Sat Apr 17 10:49:06 1999 <br>
21 Connection info: <br>
22 State=CLOSED <br>
23 Service=ftp <br>
24 Descriptor=20 <br>
25 Flags=9 <br>
26 Remote_address=172.17.55.124,2320 <br>
27 Alternative services= <br>
28 Log_remote_user=YES <br>
29 Writes_to_log=YES <br>
30 <br>
31 telnet server <br>
32 Pid=5961 <br>
33 Start_time=Sat Apr 17 10:49:20 1999 <br>
34 Connection info: <br>
35 State=CLOSED <br>
36 Service=telnet <br>
37 Descriptor=20 <br>
38 Flags=9 <br>
39 Remote_address=172.17.1.3,35461 <br>
40 Alternative services= <br>
41 Log_remote_user=YES <br>
42 Writes_to_log=YES <br>
43 <br>
44 Connection closed by foreign host <br>
45 $ <br>
Services项 <br>
 services特定项的目的是提供可用服务的列表。对services特定项来说,这是个有用的排除故障工具,但为了上述同样的安全因素,可能不会去用它。尽管如此,还是要看一看它如何工作。 <br>
例5是 services项的一个示例。端口号的选择也是任意的。也应注意访问限制于topcat,这是服务器自身的主机名。 <br>
例5 /etc/xinetd.conf中services项示例 <br>
Service services <br>
{ <br>
    type = INTERNAL UNLISTED <br>
    Socket_type = stream <br>
    protocol = tcp <br>
    port = 8099 <br>
    wait = no <br>
    Only_ from = topcat <br>
} <br>
对于servers服务来说,任何用户可执行telnet topcat 8099,并获得来自services服务的输出。例6给出了连接8099端口的实例信息信息。注意xinetd仅提供这条信息就退出,而不提供任何交互连接。 <br>
例6 查询services内部服务的输出 <br>
$ telnet topcat 8099 <br>
Trying 172.17.33.111…… <br>
Connected to topcat. <br>
Escape character is ‘^]’ <br>
Servers tcp 9997 <br>
Services tcp 8099 <br>
ftp tcp 21 <br>
telnet tcp 23 <br>
Shell tcp 514 <br>
Login tcp 513 <br>
Talk udp 517 <br>
Ntalk udp 518 <br>
Pop-2 tcp 109 <br>
Pop-3 tcp 110 <br>
Imap tcp 143 <br>
Linuxconf tcp 98 <br>
Connection closed by foreign host. <br>
$ <br>
Xadmin项 <br>
这个特定服务项提供以交互方式获得services特定服务所提供信息的方法。例7是/etc/xinetd.conf项的一个示例(端口号的选择也是任意的),类似于services和servers服务,这项服务也没有口令或其他保护,所以要谨慎设置服务的only_from项,以增强安全性。
</FONT><br>
                                      </TD>
                                    </TR>
                                <TR>
                                <TD colSpan=2><FONT 
                                class=middlefont></FONT><BR>
                                        <FONT 
                                class=normalfont>全文结束</FONT> </TD>
                                    </TR>
                                <TR>
                                <TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2 
                                height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
                        <TD vAlign=top width="20%" 
                      background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2> 
                          <DIV align=center> 
                            <table class=tableoutline cellspacing=1 cellpadding=4 
                        width="100%" align=center border=0>
                              <tr class=firstalt> 
                                <td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
                                <font class=normalfont><b>所有分类</b></font></td>
                              </tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td>    </tr>  </table></td></tr>                            </table>
                          </DIV></TD></TR>
                    <TR vAlign=top>
                        <TD width="80%"> 
                          <DIV align=center><BR>
                          </DIV>
                        </TD></TR></TBODY></TABLE></TD></TR>
                </TABLE></TD></TR>
          </TABLE>
      <TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee 
        border=0><TBODY>
        <TR>
          <TD width="50%">
              <P><FONT class=middlefont>版权所有 &copy; 2004 <A 
            href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
                违者必究. </FONT></P>
            </TD>
          <TD width="50%">
              <DIV align=right><FONT class=middlefont>Powered by: <A 
            href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
            </TD></TR></TBODY></TABLE>
      <CENTER></CENTER></TD></TR>
    </TABLE></CENTER></BODY></HTML>

⌨️ 快捷键说明

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