security - fail2ban 重复发送通知
问题描述
我们正面临fail2ban 的问题。
我们的设置例如:
监狱.conf:
[nginx-404]
enabled = true
port = http,https
filter = nginx-404
logpath = /var/log/nginx/*access.log
maxretry = 5
findtime = 300
action = mail
比行动:
[Definition]
actionstart =
actionstop =
actioncheck =
actionban = printf %%b "Hi,\n
The IP <ip> has just been banned by Fail2Ban after
<failures> attempts against <name>.\n
Regards,\n
Fail2Ban"|mail -s "[Fail2Ban] <name>: banned <ip> from `uname -n`" <dest>
actionunban =
重启服务或重启系统后。它立即发送之前执行的所有禁令。
有什么解决方案可以在重启后停止发送数百条通知?感谢您的任何建议。
解决方案
有什么解决方案可以在重启后停止发送数百条通知?
是的。只需norestored = true
在您的操作中指定。有关详细信息,请参阅PR #1669。
推荐阅读
- regex - 如何使用 RegexSet 执行替换?
- python - Python 多处理比简单的 pandas 慢
- perl - 如何使用 Perl 在 LDAP 服务器上创建用户以进行 Unix 身份验证?
- r - 如何使用 dplyr 迭代计算汇总变量
- go - 传达简单测试失败
- matlab - 如何修复“索引超过数组元素数(6)”?
- python - 在非正组件中使用不同于 Cpp 中的特征库的 python 计算特征值
- google-apps-script - 如何创建 Google 表单版本,以便我们可以在不中断生产的情况下进行开发/测试?
- javascript - 如何使用Django将值从forloop传递到模式上的url?
- javascript - JS 如何改进这个数组 -> 对象函数