2010年12月20日星期一

[GFW BLOG] 利用GFW来防止DDOS攻击

来源:http://www.fuwuqiweihu.com/use-gfw-stop-ddos-from-china/

今天在网上看到一篇防DDOS的文章,很有意思,转载学习一下:

It’s a easy way to protect your website.
这是一个非常简单的方法来保护你的网站
But it will block any request from China.
但是它将屏蔽所有来自中国的访问请求
So please remove it after the attack.
所以在攻击停止以后请删除它

在网站程序中加入以下这段代码。

<?php
if(strpos($_SERVER['REQUEST_URI'],’minghui’) === false) {
 header(‘Location:’. $_SERVER['REQUEST_URI'] . ‘?minghui’);
 exit;
}
?>

If you are in China, you can visit http://vii.im/gfw-test.php to test。
如果你在中国,你可以访问http://vii.im/gfw-test.php来测试效果。




--
Posted By GFW BLOG 功夫网 to GFW BLOG at 12/20/2010 05:15:00 PM

--
1、我们的订阅地址:http://feeds2.feedburner.com/chinagfwblog。2、发一封标题为GFW的邮件到fanqiang70ma@gmail.com,就可获取翻墙利器赛风新地址。附《数字时代》赠阅版。3、本站热烈欢迎各位朋友投稿或推荐文章,请发邮件至chinagfwblog[at]gmail.com。
停止订阅,请发邮件到
gfw-blog+unsubscribe@googlegroups.com

没有评论:

发表评论