更新:克雷格build议我现在正在尝试fail2ban。 即使我也有这个问题。
failregex虽然没有find任何结果。 我在jail.local中启用了所有apache *,这里是我的apachelogging错误:
[Fri Jul 25 11:31:20.758218 2014] [auth_basic:error] [pid 4959] [client 8.8.8.8:12767] AH01617: user GOLD: authentication failure for "/Folder": Password Mismatch [Fri Jul 25 11:31:22.941978 2014] [auth_basic:error] [pid 4959] [client 8.8.8.8:12767] AH01618: user asd not found: /Folder
这里是failegex apache-auth.conf如何configuration为:
failregex = ^%(_apache_error_client)s user .* (authentication failure|not found|password mismatch)\s*$
我也尝试添加这个代码,但仍然无法正常工作
failregex = [[]client <HOST>[]] (Digest: )?user .* (authentication failure|not found|password mismatch)
http://example.com/FOLDER/通过htaccess和htpasswd进行密码保护。 但我认为这可以是强制性的,因为没有失败的尝试限制。 任何提示,以确保这一点? 由于没有login页面或redirect页面(我不知道如何在这种情况下通过从日志中提取错误消息来使用mod安全性),Mod安全性对我的情况没有帮助。 任何其他build议阻止IP数n次失败的尝试?
谢谢!
如果您可以控制服务器的操作系统,则可以使用fail2ban通过iptables在一定次数的尝试之后阻止powershell尝试。 当IP被阻止时,您可以另外select启用通知。
检查此ServerFault问题的更多信息,Fail2ban网站此刻出现。