📄 1700.html
字号:
……<br>
经好好先生提醒,我想起来了,可能是和字符集有关系,于是补装ttfonts-zh_CN库,结果发现少装了好多东西,关联东西太多,无奈,又重新装系统……<br>
<br>
现在好了,ls,发现仍然是???,无奈,选择默认字符集为GB2312,ls,没事了!<br>
/etc/rc.d/init.d/smb restart<br>
回到网上邻居,进入,发现仍然事乱码!<br>
看来和字符集没关系,和SAMBA的配置有关系<br>
testparm发现,client code page = 936这句话在AS3里并不好使,提示这句话错误<br>
难道没办法显示中文了???<br>
找了N多资料,在一个老外的论坛了找到了正确配置方法(显示中文的东西竟然在老外论坛里),用这句话替代:unix charset=GB2312<br>
现在SAMBA能用了,正确的配置文档如下<br>
代码:<br>
<br>
[global]<br>
unix charset=GB2312<br>
workgroup = HOME<br>
server string = Samba Server<br>
security = USER<br>
encrypt passwords = Yes<br>
update encrypted = Yes<br>
obey pam restrictions = Yes<br>
pam password change = Yes<br>
passwd program = /usr/bin/passwd %u<br>
passwd chat = *New*password* %n *Retype*new*password* %n *passwd:*all*authentication*tokens*updated*successfully*<br>
unix password sync = Yes<br>
log file = /var/log/samba/%m.log<br>
max log size = 0<br>
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192<br>
wins proxy = Yes<br>
wins support = Yes<br>
remote announce = 192.168.0.255<br>
remote browse sync = 192.168.0.255<br>
create mask = 0777<br>
directory mask = 0777<br>
printing = lprng<br>
<br>
[数据中心]<br>
comment = DATACENTER<br>
path = /share/DATACENTER<br>
read only = No<br>
<br>
<br>
10、PROFTPD<br>
这个对我来说是轻车熟路了,装了个1.2.9(最高版本,目前没漏洞),编译好<br>
直接把配置文档贴出来吧<br>
代码:<br>
<br>
# This is a basic ProFTPD configuration file (rename it to<br>
# 'proftpd.conf' for actual use. It establishes a single server<br>
# and a single anonymous login. It assumes that you have a user/group<br>
# "nobody" and "ftp" for normal operation and anon.<br>
<br>
ServerType standalone<br>
DefaultServer on<br>
AllowRetrieveRestart on<br>
AllowOverwrite on<br>
AllowStoreRestart on<br>
ServerIdent on "Welcome to PLATINUM's FTP !"<br>
DefaultRoot ~<br>
DisplayLogin .welcome<br>
DisplayFirstChdir .message<br>
UseReverseDNS off<br>
IdentLookups off<br>
SystemLog /var/log/ftp.syslog<br>
TransferLog /var/log/ftp.transferlog<br>
TransferRate RETR 20 group hMovie<br>
<br>
<br>
# MaxClientsPerUser 10 "已超过最大上限 10 个guest用户,请少后再试!"<br>
# MaxClientsPerHost 4<br>
<br>
# Port 21 is the standard FTP port.<br>
Port 21<br>
<br>
# Umask 022 is a good standard umask to prevent new dirs and files<br>
# from being group and world writable.<br>
Umask 002<br>
<br>
# To prevent DoS attacks, set the maximum number of child processes<br>
# to 30. If you need to allow more than 30 concurrent connections<br>
# at once, simply increase this value. Note that this ONLY works<br>
# in standalone mode, in inetd mode you should use an inetd server<br>
# that allows you to limit maximum number of processes per service<br>
# (such as xinetd).<br>
MaxInstances 30<br>
<br>
# Set the user and group under which the server will run.<br>
User nobody<br>
Group nobody<br>
<br>
# Normally, we want files to be overwriteable.<br>
<Directory /><br>
AllowOverwrite on<br>
</Directory><br>
<br>
<Directory /share/DATACENTER/电影><br>
<Limit RNFR DELE WRITE><br>
DenyGroup hMovie<br>
</Limit><br>
</Directory><br>
<br>
<Anonymous ~guest><br>
User guest<br>
Group ftp<br>
AllowOverwrite on<br>
AllowRetrieveRestart on<br>
AllowStoreRestart on<br>
TransferRate RETR 10<br>
# MaxClientsPerUser 30 "已超过最大上限 30 个guest用户,请少后再试!"<br>
# MaxClientsPerHost 4<br>
<br>
<Directory /share/ftp/上传目录><br>
Umask 000<br>
<Limit RNFR DELE RETR><br>
DenyAll<br>
</Limit><br>
</Directory><br>
</Anonymous><br>
<br>
<br>
11、网络安全问题<br>
服务架好了,网络安全不容忽视<br>
这是我的“反弹式”防火墙<br>
代码:<br>
<br>
#! /bin/bash<br>
/sbin/modprobe ip_conntrack_ftp<br>
/sbin/modprobe ip_nat_ftp<br>
/sbin/iptables -F -t filter<br>
/sbin/iptables -F -t nat<br>
/sbin/iptables -P INPUT ACCEPT<br>
/sbin/iptables -P OUTPUT ACCEPT<br>
/sbin/iptables -P FORWARD ACCEPT<br>
/sbin/iptables -t nat -P PREROUTING ACCEPT<br>
/sbin/iptables -t nat -P POSTROUTING ACCEPT<br>
/sbin/iptables -t nat -P OUTPUT ACCEPT<br>
<br>
# ALLOW ALL in PRIVATE NET<br>
/sbin/iptables -A INPUT -i lo -j ACCEPT<br>
/sbin/iptables -A INPUT -i eth1 -j ACCEPT<br>
<br>
# FTP<br>
/sbin/iptables -A INPUT -m limit --limit 100/s --limit-burst 100 -p tcp --dport 21 -j ACCEPT<br>
<br>
# SSH & TELNET<br>
/sbin/iptables -A INPUT -p tcp --dport 22 -j ACCEPT<br>
<br>
# MAIL<br>
/sbin/iptables -A INPUT -p tcp --dport 25 -j ACCEPT<br>
/sbin/iptables -A INPUT -p tcp --dport 110 -j ACCEPT<br>
<br>
# VPN<br>
#/sbin/iptables -A INPUT -p tcp --dport 1723 -j ACCEPT<br>
#/sbin/iptables -A INPUT -p gre -j ACCEPT<br>
<br>
# WWW<br>
/sbin/iptables -A INPUT -m limit --limit 100/s --limit-burst 100 -p tcp --dport 80 -j ACCEPT<br>
<br>
# MYSQL<br>
# /sbin/iptables -A INPUT -p tcp --dport 3306 -j ACCEPT<br>
<br>
# SOCKS5<br>
# /sbin/iptables -A INPUT -p tcp --dport 8039 -j ACCEPT<br>
<br>
# ICMP(PING)<br>
/sbin/iptables -A INPUT -p icmp --icmp-type echo-request -j REJECT<br>
/sbin/iptables -A INPUT -p icmp --icmp-type ! echo-request -j ACCEPT<br>
<br>
# NAT<br>
/sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE<br>
<br>
# DNAT SQL-SERVER & RADMIN to PRIVATE NET<br>
/sbin/iptables -A PREROUTING -t nat -p tcp -s ! 192.168.0.0/24 --dport 4899 -j DNAT --to 192.168.0.2:4899<br>
/sbin/iptables -A PREROUTING -t nat -p tcp -s ! 192.168.0.0/24 --dport 5000 -j DNAT --to 192.168.0.3:4899<br>
iptables -t nat -A PREROUTING -p tcp -m tcp -s 192.168.0.0/24 --dport 80 -j DNAT --to 192.168.0.1:3128<br>
<br>
# DENY OTHERS<br>
/sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT<br>
/sbin/iptables -A INPUT -j MIRROR<br>
<br>
<br>
终于写完了,不容易,这17小时没白费!
</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 + -