通过使用 php 修改 htaccess 来阻止暴力攻击
Blocking bruteforce attack by modifying htaccess with php
当检测到暴力破解或 DoS 攻击时,通过在 php 中动态修改 .htaccess 文件来自动阻止 IP 地址是否可以接受(并且可能)?
是的,可以阻止 IP。但是尝试以这种方式阻止 DDos 攻击毫无意义,因为 apache 进程已经生成。
Deny from xx.xx.xx.xx
阻止 IP 时,您通常会在防火墙中输入规则以阻止该 IP。
我建议您看一下 Apache 安全模块
此外,fail2ban 是阻止暴力攻击的好方法。
https://www.linode.com/docs/security/using-fail2ban-for-security
当检测到暴力破解或 DoS 攻击时,通过在 php 中动态修改 .htaccess 文件来自动阻止 IP 地址是否可以接受(并且可能)?
是的,可以阻止 IP。但是尝试以这种方式阻止 DDos 攻击毫无意义,因为 apache 进程已经生成。
Deny from xx.xx.xx.xx
阻止 IP 时,您通常会在防火墙中输入规则以阻止该 IP。
我建议您看一下 Apache 安全模块
此外,fail2ban 是阻止暴力攻击的好方法。
https://www.linode.com/docs/security/using-fail2ban-for-security