首页 > 解决方案 > 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 =

重启服务或重启系统后。它立即发送之前执行的所有禁令。

有什么解决方案可以在重启后停止发送数百条通知?感谢您的任何建议。

标签: securitynginxnotificationsfail2ban

解决方案


有什么解决方案可以在重启后停止发送数百条通知?

是的。只需norestored = true在您的操作中指定。有关详细信息,请参阅PR #1669


推荐阅读