我无法通过fail2ban来检测失败的apache-auth尝试
过滤器如下所示:
^%(_apache_error_client)s (AH01617: )?user .* authentication failure for "\S*": Password Mismatch$
^%(_apache_error_client)s (AH01618: )?user .* not found(: )?\S*\s*$
Run Code Online (Sandbox Code Playgroud)
以及出现的错误:
[Tue Dec 23 13:41:45.870693 2014] [auth_basic:error] [pid 2818] [client 97.171.82.123:91131] AH01617: user miati: authentication failure for "/test/file.html": Password Mismatch, referer: https://example.org/test/file.html
[Tue Dec 23 13:41:45.870693 2014] [auth_basic:error] [pid 2818] [client 97.171.82.123:91131] AH01617: user miati: authentication failure for "/test/file.html": Password Mismatch, referer: https://example.org/test/file.html
Run Code Online (Sandbox Code Playgroud)
都没有正常工作.我想让他们重新编写,以便他们工作,但我无法弄清楚过滤器是如何工作的,谷歌搜索并没有让我任何地方.大多数指南都认为我理解正则表达式,但我不这样做.
任何人都可以解释(或链接)过滤器中的这些参数是什么意思,所以我可以自己修改它?
小智 8
我遇到了与Fail2Ban v0.8.11相同的问题,并且在您发布后大约13个小时内发现了您的帖子.我最终的解决方案是使用官方GitHub 仓库中更新的apache-common.conf和apache-auth.conf文件.它现在捕获登录尝试,然后自动禁止IP地址,虽然我ufw
用于实际的禁止/取消.