<?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>Shadow &#38; Honnix &#187; 搜狗</title>
	<atom:link href="http://honnix.com/blog/archives/tag/%e6%90%9c%e7%8b%97/feed" rel="self" type="application/rss+xml" />
	<link>http://honnix.com/blog</link>
	<description>she&#039;s growing up</description>
	<lastBuildDate>Sun, 15 Jan 2012 10:44:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>如何对付那些发了疯的蜘蛛们</title>
		<link>http://honnix.com/blog/archives/580</link>
		<comments>http://honnix.com/blog/archives/580#comments</comments>
		<pubDate>Sun, 06 Jun 2010 01:15:52 +0000</pubDate>
		<dc:creator>honnix</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[CPU占用率]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[二奶机]]></category>
		<category><![CDATA[搜狗]]></category>
		<category><![CDATA[爬虫]]></category>
		<category><![CDATA[腾讯]]></category>
		<category><![CDATA[蜘蛛]]></category>
		<category><![CDATA[防火墙]]></category>

		<guid isPermaLink="false">http://honnix.com/blog/?p=580</guid>
		<description><![CDATA[最近两天，二奶机经常过热关机，毕竟是老机器了，经不起过高的温度。什么原因呢？top一下发现apache占用CPU高达30％。这就诡异了，我的网站啥时候也没有这么高的访问量啊。查了下access_log，居然有无数的IP来访。whois加上Google，原来是一堆的蜘蛛，大部分来自腾讯和搜狗。简直是疯狗，同时放出几十个蜘蛛来爬，这哪受得了！ 我的路由器没有防火墙功能，所以只好在二奶机上弄了。还好上次编内核的时候把iptables编进去了，否则我估计这种天气，内核都编不下去就要关机了。折腾了一番，终于搞定。Gentoo对iptables的支持还不错，emerge了之后/etc/init.d里面就有了启动脚本，简单地看了一下也就会用了。现在我的iptables里面是这种状况，列出来给需要的人参考一下（基本上我把IP在中国的都给踢出去了，谁知道它们在找什么）： # iptables -L Chain INPUT (policy ACCEPT) target     prot opt source               destination all  &#8211;  anywhere             anywhere DROP       all  &#8211;  124.115.4.0/24       anywhere DROP       all  &#8211;  124.115.0.0/24       anywhere&#8230;]]></description>
			<content:encoded><![CDATA[<p>最近两天，二奶机经常过热关机，毕竟是老机器了，经不起过高的温度。什么原因呢？top一下发现apache占用CPU高达30％。这就诡异了，我的网站啥时候也没有这么高的访问量啊。查了下access_log，居然有无数的IP来访。whois加上Google，原来是一堆的蜘蛛，大部分来自腾讯和搜狗。简直是疯狗，同时放出几十个蜘蛛来爬，这哪受得了！</p>
<p>我的路由器没有防火墙功能，所以只好在二奶机上弄了。还好上次编内核的时候把iptables编进去了，否则我估计这种天气，内核都编不下去就要关机了。折腾了一番，终于搞定。Gentoo对iptables的支持还不错，emerge了之后/etc/init.d里面就有了启动脚本，简单地看了一下也就会用了。现在我的iptables里面是这种状况，列出来给需要的人参考一下（基本上我把IP在中国的都给踢出去了，谁知道它们在找什么）：</p>
<blockquote>
<div id="_mcePaste"># iptables -L</div>
<div id="_mcePaste">Chain INPUT (policy ACCEPT)</div>
<div id="_mcePaste">target     prot opt source               destination</div>
<div id="_mcePaste">all  &#8211;  anywhere             anywhere</div>
<div id="_mcePaste">DROP       all  &#8211;  124.115.4.0/24       anywhere</div>
<div id="_mcePaste">DROP       all  &#8211;  124.115.0.0/24       anywhere</div>
<div id="_mcePaste">DROP       all  &#8211;  122.194.170.0/24     anywhere</div>
<div id="_mcePaste">DROP       all  &#8211;  114.80.93.56         anywhere</div>
<div id="_mcePaste">DROP       all  &#8211;  122.81.25.8          anywhere</div>
<div id="_mcePaste">DROP       all  &#8211;  123.125.66.0/24      anywhere</div>
<div id="_mcePaste">DROP       all  &#8211;  218.5.3.149          anywhere</div>
<div id="_mcePaste">DROP       all  &#8211;  220.181.94.222       anywhere</div>
<div id="_mcePaste">Chain FORWARD (policy ACCEPT)</div>
<div id="_mcePaste">target     prot opt source               destination</div>
<div id="_mcePaste">Chain OUTPUT (policy ACCEPT)</div>
<div id="_mcePaste">target     prot opt source               destination</div>
</blockquote>
<div>最后简单说一下iptables的用法，网上到处都是，不多啰嗦了。</div>
<blockquote>
<div>iptables -A INPUT -s &lt;ip&gt; -j DROP</div>
</blockquote>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://honnix.com/blog/archives/580/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

