实践中使用haproxy 防御ddos
来源:互联网 发布:淘宝信誉查询软件 编辑:程序博客网 时间:2024/05/18 01:36
首先在http 这里做一个门防御
frontend http
bind 10.0.0.20:80
acl anti_ddos always_true
#白名单
acl whiteip src -f /usr/local/haproxy/etc/whiteip.lst
#标记非法用户
stick-table type ip size 20k expire 2m store gpc0
tcp-request connection track-sc1 src
tcp-request inspect-delay 5s
#拒绝非法用户建立连接
tcp-request connection reject if anti_ddos { src_get_gpc0 gt 0 }
然后在具体网站模块那再做个防御门
backend xxx.xxx.cn
mode http
option forwardfor
option httplog
balance roundrobin
cookie SERVERID insert indirect
acl anti_ddos always_false
#白名单
acl whiteip src -f /usr/local/haproxy/etc/whiteip.lst
#存储client10秒内的会话速率
stick-table type ip size 20k expire 2m store http_req_rate(10s),bytes_out_rate(10s)
tcp-request content track-sc2 src
#十秒内会话速率超过50个则可疑
acl conn_rate_limit src_http_req_rate(www.xx.cn) gt 80
#判断http请求中是否存在SERVERID的cookie
acl cookie_present cook(SERVERID) -m found
#标记为非法用户
acl mark_as_abuser sc1_inc_gpc0 gt 0
tcp-request content reject if anti_ddos !whiteip conn_rate_limit mark_as_abuser
今天尽然发现自己的文章被人一字不漏的复制发帖到了其他网站
原创文章地址http://blog.csdn.net/saga_gallon/article/details/42120455
- 实践中使用haproxy 防御ddos
- DDOS 防御
- 使用HAProxy防范简单的DDos攻击
- DDoS deflate 防御ddos攻击
- 使用路由器防御DDos攻击的新方法研究
- 使用XDP(eXpress Data Path)防御DDoS攻击
- DDoS防御指南
- DDoS的防御
- 深入浅出DDoS攻击防御
- 深入浅出DDoS攻击防御
- DDOS攻击、防御、简析
- DDoS攻击与防御
- 深入浅出DDoS攻击防御
- 深入浅出DDoS攻击防御
- 深入浅出DDoS攻击防御
- 深入浅出DDoS攻击防御
- DDoS攻击防御
- DDoS攻击防御方案
- 坚持(发表于2014-12-24 10:17)
- 《老罗的Android之旅》阅读笔记——键盘(Keyboard)消息处理机制
- 如何用iptables实现NAT
- 拍照上传的图片被旋转问题
- Android中JNI开发Android.mk写法
- 实践中使用haproxy 防御ddos
- smarty模板引擎(二)分配数据类型
- Android 通过http访问服务器
- radioButton 或者ImageButton存在item里的话 列表的点击事件就不可用
- Eclipse Tomcat8 配置启动
- EBS 接口开发
- 迁移zencart后出现 WARNING: An Error occurred, please refresh the page and try again的解决方法
- 命令行参数
- 从选域名到SEO,盘点Web开发最常见的5个误区