DDOS防御专家-提供超强DDoS高防/CC防护/大流量清洗服务!
当前位置:主页 > DDOS防御 > 正文

ddos高防ip_高铁防松螺母_超稳定

09-17 DDOS防御

系统环境:Centos 6.5 X64
测试完成日期为2017.6.14 by evan.li


1.安装 DDoS deflate

[root@host ]# wget
[root@host ]# chmod 0700 install.sh
[root@host ]# ./install.sh

//弹出版权信息后,在SSH下键入 q , 即可退出版权信息。

2.配置 DDoS deflate .

[root@host ]# vi /usr/local/ddos/ddos.conf
##### Paths of the script and other files
PROGDIR=”/usr/local/ddos”
PROG=”/usr/local/ddos/ddos.sh”
IGNORE_IP_LIST=”/usr/local/ddos/ignore.ip.list” //白名单
CRON=”/etc/cron.d/ddos.cron”
APF=”/etc/apf/apf”
IPT=”/sbin/iptables”
—————————————————————————-

##### frequency in minutes for running the script
##### Caution: Every time this setting is changed, run the script with –cron
##### option so that the new frequency takes effect
FREQ=1
//ddos.sh执行的频率,单位是分钟,搭配crontab来执行.
如果你更改了该设置,请执行 /usr/local/ddos/ddos.sh –cron
—————————————————————————-

##### How many connections define a bad IP? Indicate that below.
NO_OF_CONNECTIONS=150
//当哪个IP的连接数达到150就加入黑名单;查看连接数你可以执行
#netstat -ntu | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n
—————————————————————————-

##### APF_BAN=1 (Make sure your APF version is atleast 0.96)
##### APF_BAN=0 (Uses iptables for banning ips instead of APF)
APF_BAN=0
//一般情况下你是使用iptables来做防火墙,所以这里你需要将 APF_BAN的值改为0.
—————————————————————————-

##### KILL=0 (Bad IPs are’nt banned, good for interactive execution of script)
##### KILL=1 (Recommended setting)
KILL=1
//将非法的的IP加入iptables的INPUT链中,DROP掉.
—————————————————————————-

##### An email is sent to the following address when an IP is banned.
##### Blank would suppress sending of mails
EMAIL_TO="evan"
//事件通知人的邮件地址,给evan发一封邮件,可以改成你的邮箱地址
—————————————————————————-
##### Number of seconds the banned ip should remain in blacklist.
BAN_PERIOD=600
//关押黑名单中的IP的时长,阻止被定义为ddos攻击者ip与本机通信时间,默认为600秒

更改白名单配置
[root@host ]# vi /usr/local/ddos/ddos.sh
在117行,更改此段代码为:netstat -ntu | awk '{print $5}' | egrep -o "[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}" | sort | uniq -c | sort -nr > $BAD_IP_LIST

注释掉134行:echo $CURR_LINE_IP >> $IGNORE_IP_LIST

执行脚本
[root@host ]# /usr/local/ddos/ddos.sh --cron

执行后,会生成一个排程文件,内容如下
[root@host ]# vi /etc/cron.d/ddos.cron
SHELL=/bin/sh
0-59/1 * * * * root /usr/local/ddos/ddos.sh >/dev/null 2>&1

安装WEB压力测试软件Siege
一款开源的压力测试工具,可以根据配置对一个WEB站点进行多用户的并发访问,记录每个用户所有请求过程的相应时间,并在一定数量的并发访问下重复进行。
官方:
参考文章:  https://www.vpser.net/opt/webserver-test.html

[root@host ]#  wget

[root@host ]#  tar zxf siege-4.0.2.tar.gz
[root@host ]#  cd siege-4.0.2
安装:
[root@host siege-4.0.2]#  ./configure
[root@host siege-4.0.2]#  make
[root@host siege-4.0.2]#  make install

使用
[root@host siege-4.0.2]# siege -c 200 -r 10 -f example.url
-c是并发量,-r是重复次数。 url文件就是一个文本,每行都是一个url,它会从里面随机访问的。

example.url内容为:


运行5分钟后,按Ctrl+c 中断任务,显示出结果
运行结果说明

Lifting the server siege...
Transactions:                    8 hits       //完成8次处理

版权保护: 本文由 DDOS防御专家 原创,转载请保留链接: http://www.ddosgb.com/ddos1/69.html

DDoS防御专家简介孤之剑
国内资深白帽子二十人组成员,前BAT资深网络安全工程师,知名网络安全站点板块大神,每年提交Google及微软漏洞,原sina微博负载插件开发者,现在整体防御复合攻击长期接受1-4.7T攻击,CC防护自主开发指纹识别系统,可以做到99.9999%的无敌防御。
  • 文章总数
  • 8554671访问次数
  • 建站天数

    DDOS防御

    ddos防御

    cc防护

    web安全

    高防服务器

    高防cdn


    QQ客服

    400-0797-119

    X