您好,亲爱的Stackoverflow,
我对DoS攻击有问题,我尝试使用.htaccess过滤攻击,但是目前根本没有发送用户代理,那么如何过滤此攻击?我已经设法过滤了许多用户代理-但是现在Apache没有显示任何用户代理。
我尝试添加RewriteConditions:
RewriteCond %{HTTP_USER_AGENT} ^$ [nocase] RewriteRule ^(.*)$ http://example.com/ [L,R=301]
请求:
x.x.x.x - - [21/Jun/2019:03:25:00 +0200] "GET / HTTP/1.1" 200 3397
x.x.x.x - - [21/Jun/2019:03:24:50 +0200] "GET / HTTP/1.1" 200 3397
x.x.x.x - - [21/Jun/2019:03:24:50 +0200] "GET / HTTP/1.1" 200 3397
x.x.x.x - - [21/Jun/2019:03:24:48 +0200] "GET / HTTP/1.1" 200 3397
x.x.x.x - - [21/Jun/2019:03:24:57 +0200] "GET / HTTP/1.1" 200 3397
我该如何过滤?
非常感谢您