在面对恶意攻击ddos(分布式拒绝服务)时,如果想要限制某ip(或某域名)频繁访问http:xx.xx.xx.xx:8080/xxxxxxx路径的次数,该怎么做呢?用nginx能做到吗
回复 (6)
J
J
引用 Justin-lutry this http://gadelkareem.com/2012/03/25/limit requests per ip on nginx using httplimitzonemod...
@Justin-lu 恩谢谢,这个很接近了,但是这只能限制访问某端口下的所有服务,貌似没写关于应用程序的某url的的限吧?
L
看看这个栗子: https://gist.github.com/ipmb/472da2a9071dd87e24d3 /account/login/ 对每个IP,只允许每秒一次访问
limit_req_zone $binary_remote_addr zone=login:10m rate=1r/s;
N
DDOS限制ip没什么用
J
L
引用 Neil-UWADDOS限制ip没什么用
@Neil-UWA 楼主不是要处理DDOS flood,只是限制IP访问次数。
nginx 能缓解DDOS,也不是万能的 https://www.nginx.com/blog/mitigating-ddos-attacks-with-nginx-and-nginx-plus/
参与回复
登录后即可参与回复。登录