在互联网发展迅速的网络时代下,现在每个人都会通过服务器在搭建网站,不管是商用也好,还是学习也好,都会受到来自互联网的非法请求。非法请求又分为很多种,今天我们重点介绍服务器受到DDOS和CC攻击怎么来防御。科普DDoS和CC防御可以百度一下。
其实防御都可以通过花钱升级防护来解决,但是很多人都是一些小网站,用更高的金钱来做防护,这显然是不现实的。而vDDoS是一款免费的用来防御和减轻DDOS攻击的脚本。官方更直接说了这是“HTTP(S) DDoS保护反向代理”下面我们来介绍一下安装方法。
一、官方网站
二、项目信息
- vDDoS下载:https://github.com/duy13/vDDoS-Protection
- SourceForge:https://sourceforge.net/projects/vddos-protection
- Naxsi模块:https://github.com/nbs-system/naxsi
- Kyprizel模块:https://github.com/kyprizel/testcookie-nginx-module
- Nginx软件:https://github.com/nginx/nginx
三、系统要求
yum -y install epel-release yum -y install curl wget gc gcc gcc-c++ pcre-devel zlib-devel make wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel gperftools gperftools-devel libatomic_ops-devel perl-ExtUtils-Embed gcc automake autoconf apr-util-devel gc gcc gcc-c++ pcre-devel zlib-devel make wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel gperftools gperftools-devel libatomic_ops-devel perl-ExtUtils-Embed
四、安装教程
从源代码下载:https://github.com/duy13/vDDoS-Protection
安装最新版本:(System CentOS 7 x86_64和vDDoS最新版本):
curl -L https://github.com/duy13/vDDoS-Protection/raw/master/latest.sh -o latest.sh chmod 700 latest.sh bash latest.sh
五、网站防护示例
# vi /vddos/conf.d/website.conf # Website Listen Backend Cache Security SSL-Prikey SSL-CRTkey default http://0.0.0.0:80 http://127.0.0.1:8080 no 200 no no your-domain.com http://0.0.0.0:80 http://127.0.0.1:8080 no 200 no no default https://0.0.0.0:443 https://127.0.0.1:8443 no 307 /vddos/ssl/your-domain.com.pri /vddos/ssl/your-domain.com.crt your-domain.com https://0.0.0.0:443 https://127.0.0.1:8443 no 307 /vddos/ssl/your-domain.com.pri /vddos/ssl/your-domain.com.crt your-domain.com https://0.0.0.0:4343 https://103.28.249.200:443 yes click /vddos/ssl/your-domain.com.pri /vddos/ssl/your-domain.com.crt
编辑完成后记得输入:wq来保存website.conf配置文件
六、启动防护
vddos restart
评论前必须登录!
注册