📄 1679.html
字号:
# %t 时间,<br>
# %T 服务请求时间<br>
CustomLog logs/access_log combined<br>
<br>
<br>
<br>
2.3 作用域和其他作用域<br>
<br>
<br>
<br>
order deny,allow<br>
deny from all<br>
<br>
#例外如下<br>
<br>
order allow,deny<br>
allow from all<br>
<br>
#例如:allow from all,<br>
# allow from 10.0.0.0/8,<br>
# allow from 10. ,<br>
# allow from .china.com<br>
<br>
# 如果把private.txt改成index.html会怎么样?<br>
order deny,allow<br>
deny from all<br>
<br>
<br>
<br>
<br>
a.4 验证<br>
<br>
<br>
<br>
authtype basic<br>
authname "private areas"<br>
authuserfile /etc/httpd/conf/privatepasswd<br>
require valid-user<br>
<br>
<br>
<br>
<br>
创建验证数据库<br>
<br>
<br>
#htpasswd -bc /etc/httpd/conf/privatepasswd ben ben<br>
#htpasswd -b /etc/httpd/conf/privatepasswd kim<br>
<br>
<br>
<br>
新密码:kim<br>
重新输入密码:kim<br>
<br>
还有一种方式创建.htaccess文件,使用accessfilename .htaccess选项,格式为:<br>
<br>
<br>
authtype basic<br>
authname "student club"<br>
authuserfile /etc/httpd/conf/studentclub<br>
require valie-user<br>
<br>
<br>
<br>
另外:用mysql+php来验证网络服务,学有余力的学员可以try<br>
<br>
<br>
3.ftp服务属于xinetd服务<br>
<br>
3.1 禁止你名ftp登陆<br>
<br>
/etc/passwd和/etc/shadow中删除ftp<br>
/etc/ftpusers中加入ftp或者anonymous<br>
<br>
3.2 /etc/ftpaccess配置文件<br>
<br>
<br>
loginfails 3<br>
greeting brief<br>
# 显示简短的消息给用户,忽略了版本信息<br>
# 220 liwei FTP server (Version wu-2.6.1-1icon_cool.gif ready.<br>
<br>
# Turn on logging to /var/log/xferlog<br>
log transfers anonymous,guest,real inbound,outbound<br>
# 纪录所有种类的用户初始化传输<br>
<br>
log commands anonymous,guest,real<br>
# 纪录所有种类的用户输入的所有命令<br>
<br>
chmod no anonymous,guest<br>
delete no anonymous,guest<br>
overwrite no anonymous,guest<br>
rewrite no anonymous,guest<br>
umask no anonymous,guest<br>
passwd-check rfc822 enforce<br>
# 强制使用合法的email账号作为匿名ftp登陆的密码<br>
noretrieve /etc/ /home/*/.htaccess core<br>
# 以下内容为复习<br>
class all real,guest,anonymous *<br>
limit all 20 Any /etc/mesg<br>
upload /var/ftp * no<br>
upload /var/ftp /pub/imcoming yes ftp daemon 0600 dirs<br>
alias inc /pub/incoming<br>
email admin@localhost<br>
restricted-uid %501-510<br>
# 流量限制自己。。。<br>
throughput /var/ftp * * oo - *<br>
throughput /var/ftp /pub* * 2000 0.5 *<br>
throughput /var/ftp /pub* readme oo - *<br>
throughput /var/ftp /pub* * oo - *.fudan.edu.cn<br>
cdpath /pub<br>
# 指定优先搜寻路经,例如cd abc,会优先寻找/pub下的abc<br>
cdpath /<br>
# 然后再是/目录下的abc<br>
<br>
<br>
<br>
3.3命令(客户端命令略)<br>
<br>
<br>
ftpshut now<br>
ftpshut 1001<br>
ftpshut +20<br>
ftpshut -l 30 -d 10 1700 "ftp is shutting down "<br>
ftprestart<br>
对/etc/shutmsg和/var/ftp/shutmsg文件删除操作<br>
ftpwho<br>
ftpcount<br>
匿名上传目录权限位chmod 733 incoming<br>
<br>
<br>
<br>
<br>
4.samba的安全<br>
<br>
不属于xinetd服务,但是samba的管理工具swat属于xinetd服务<br>
<br>
swat(samba web administration tool) 启动swat不必启动apache服务器,swat有自己的内嵌的web服务器<br>
<br>
因为samba不使用加密连接,所以不要远程使用swat工具<br>
<br>
包过滤<br>
<br>
<br>
#grep netbios /etc/services<br>
<br>
<br>
<br>
允许外部某个主机访问内部samba服务,通过ipchains建立如下规则<br>
<br>
<br>
#ipchains -A input -p tcp -s trusted.ext.system.ip<br>
-d myip 137:139 -j ACCEPT<br>
#ipchains -A input -p udp -s trusted.ext.system.ip<br>
-d myip 137:139 -j ACCEPT<br>
#ipchains -A input -i !lo -d myip 137:139 -j DENY -l<br>
<br>
<br>
<br>
通过iptable实现如下(略)<br>
<br>
<br>
#iptables -t filter -A INPUT -p tcp -s trusted.ext.system.ip<br>
-d myip 137:139 -j ACCEPT<br>
#iptables -t filter -A INPUT -p udp -s trusted.ext.system.ip<br>
-d myip 137:139 -j ACCEPT<br>
#iptables -t filter -A INPUT -i !lo -d myip 137:139 -j DROP<br>
<br>
</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>版权所有 © 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 + -