<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>和谐空间-咖啡奇趣 &#187; liunx</title>
	<atom:link href="http://blog.vpear.com/index.php/tag/liunx/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.vpear.com</link>
	<description>喝着咖啡、香茶，看着奇闻趣事，欣赏着美图，很好！很好！</description>
	<lastBuildDate>Fri, 06 Jan 2012 08:50:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>linux下iptables封ip或ip段的一些常见命令</title>
		<link>http://blog.vpear.com/index.php/2010/12/16/15186</link>
		<comments>http://blog.vpear.com/index.php/2010/12/16/15186#comments</comments>
		<pubDate>Thu, 16 Dec 2010 04:32:27 +0000</pubDate>
		<dc:creator>一品少掌柜</dc:creator>
				<category><![CDATA[.]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[liunx]]></category>

		<guid isPermaLink="false">http://blog.vpear.com/?p=15186</guid>
		<description><![CDATA[封单个IP的命令是： iptables -I INPUT -s 58.61.156.160 -j DROP 或 iptables -A INPUT -s 58.61.156.160 -j DROP 禁止服务器访问此IP iptables -A OUTPUT -d 1.2.3.4 -j DROP 封IP段的命令是： iptables -I INPUT -s 58.61.0.0/16 -j DROP iptables -I INPUT -s 58.60.0.0/16 -j DROP iptables -I INPUT -s 58.59.0.0/16 -j DROP 封整个段的命令是： iptables -I INPUT -s 58.0.0.0/8 -j DROP 封几个段的命令是： [...]]]></description>
			<content:encoded><![CDATA[<p>封单个IP的命令是：<br />
iptables -I INPUT -s 58.61.156.160 -j DROP<br />
或<br />
iptables -A INPUT -s 58.61.156.160 -j DROP</p>
<p>禁止服务器访问此IP<br />
iptables -A OUTPUT -d 1.2.3.4 -j DROP</p>
<p>封IP段的命令是：<br />
iptables -I INPUT -s 58.61.0.0/16 -j DROP<br />
iptables -I INPUT -s 58.60.0.0/16 -j DROP<br />
iptables -I INPUT -s 58.59.0.0/16 -j DROP</p>
<p>封整个段的命令是：<br />
iptables -I INPUT -s 58.0.0.0/8 -j DROP</p>
<p>封几个段的命令是：<br />
iptables -I INPUT -s 58.61.157.0/24 -j DROP<br />
iptables -I INPUT -s 58.61.156.0/24 -j DROP</p>
<p>想在服务器启动自运行的话有三个方法：<br />
1、把它加到/etc/rc.local中</p>
<p>2、iptables-save &gt;/etc/sysconfig/iptables可以把你当前的iptables规则放到/etc/sysconfig/iptables中，系统启</p>
<p>动iptables时自动执行。<br />
 <br />
3、service iptables save 也可以把你当前的iptables规则放/etc/sysconfig/iptables中，系统启动iptables时自动</p>
<p>执行。<br />
后两种更好此，一般iptables服务会在network服务之前启来，更安全。</p>
<p>4、开机后自启动防火墙的设定<br />
命令行输入 #ntsysv<br />
在gui中选上iptables后。确认</p>
<p>5.简单配置防火墙规则<br />
# setup选择<br />
防火墙配置–》定制–》在“其他端口”中输入要开放的端口, 例：1723<br />
ip地址和网关可以再setup中设定<br />
<strong>#清空屏蔽IP</strong><br />
iptables -t filter -D INPUT -s 1.2.3.4 -j DROP<br />
iptables -t filter -D OUTPUT -d 1.2.3.4 -j DROP</p>
<p><strong>#一键清空所有规则</strong><br />
iptables -F  <span style="color: #ff0000;">全清掉了 注意：慎用</span><br />
<strong><br />
#查看</strong><br />
iptables -L INPUT<br />
或<br />
iptables -L<br />
或<br />
iptables-save</p>
<p><strong>#处理IP碎片数量,防止攻击,允许每秒100个</strong><br />
iptables -A FORWARD -f -m limit &#8211;limit 100/s &#8211;limit-burst 100 -j ACCEPT<br />
<strong>#设置ICMP包过滤,允许每秒1个包,限制触发条件是10个包</strong><br />
iptables -A FORWARD -p icmp -m limit &#8211;limit 1/s &#8211;limit-burst 10 -j ACCEPT</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vpear.com/index.php/2010/12/16/15186/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>修改Apache的最大连接数，默认为256个。</title>
		<link>http://blog.vpear.com/index.php/2010/04/21/15087</link>
		<comments>http://blog.vpear.com/index.php/2010/04/21/15087#comments</comments>
		<pubDate>Wed, 21 Apr 2010 06:39:10 +0000</pubDate>
		<dc:creator>一品少掌柜</dc:creator>
				<category><![CDATA[.]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[liunx]]></category>

		<guid isPermaLink="false">http://blog.vpear.com/?p=15087</guid>
		<description><![CDATA[  Apache的最大连接数，默认为256个。     修改apache的最大连接数，方法如下：         步骤一：先修改./apache/conf/httpd.conf文件。         # vi httpd.conf         将“#Include conf/extra/httpd-mpm.conf”前面的 # 去掉。         保存。         步骤二：再修改./apache/conf/extra/httpd-mpm.conf文件。         # vi httpd-mpm.conf        找到&#60;IfModule mpm_prefork_module&#62; 这一行           原：              &#60;IfModule mpm_prefork_module&#62;               StartServers         5               MinSpareServers      5               MaxSpareServers      10               MaxClients           150               MaxRequestsPerChild  0            &#60;/IfModule&#62;         修改后             &#60;IfModule [...]]]></description>
			<content:encoded><![CDATA[<p>  Apache的最大连接数，默认为256个。</p>
<p>    修改apache的最大连接数，方法如下：<br />
   <br />
    步骤一：先修改./apache/conf/httpd.conf文件。<br />
        # vi httpd.conf<br />
        将“#Include conf/extra/httpd-mpm.conf”前面的 # 去掉。<br />
        保存。<br />
   <br />
    步骤二：再修改./apache/conf/extra/httpd-mpm.conf文件。<br />
        # vi httpd-mpm.conf<br />
       找到&lt;IfModule mpm_prefork_module&gt; 这一行<br />
          原：<br />
             &lt;IfModule mpm_prefork_module&gt;<br />
              StartServers         5<br />
              MinSpareServers      5<br />
              MaxSpareServers      10<br />
              MaxClients           150<br />
              MaxRequestsPerChild  0<br />
           &lt;/IfModule&gt;</p>
<p>        修改后<br />
            &lt;IfModule mpm_prefork_module&gt;<br />
              ServerLimit          2500<br />
              StartServers         10<br />
              MinSpareServers      5<br />
              MaxSpareServers      10<br />
              MaxClients           2500<br />
              MaxRequestsPerChild  0<br />
           &lt;/IfModule&gt;</p>
<p><span style="color: #ff0000;">注意：要同时修改ServerLimit这个选项</span><br />
             <span style="color: #ff0000;">修改后，一定不要apachectl restart，而是先 apachectl stop 然后再 apachectl start才可以。 </span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vpear.com/index.php/2010/04/21/15087/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

