fail2ban:如何组合多个 failregex?

fail2ban:如何组合多个 failregex?

failregex我在文件中添加多行时遇到问题jail.local。如果只有一行,则可行,但如果有两行,则不行。

这是我的 jail.local 配置:

[sshd]
enabled = true
logpath = %(sshd_log)s
port = 22
banaction = iptables-multiport
mode = aggressive
failregex = %(known/failregex)s
            ^Bad protocol version identification '.*' from <HOST>
failregex = %(known/failregex)s 
            ^runcloud\[\d+\]: echo: http: TLS handshake error from <ADDR>:\d+

答案1

想通了,删除第二个failregex = %(known/failregex)s

failregex = %(known/failregex)s ^Bad 协议版本标识 '.*' 来自 ^runcloud[\d+]: echo: http: TLS 握手错误来自:\d+

相关内容