fail2ban: multiline "failregex" not working
It turns out that the problem I was having was unrelated to the change of multiple filters into a single filter with multiple failregex
lines. I had an unrelated problem on my machine which occurred around the same time which I originally overlooked, and I mistakenly thought that the fail2ban
filter was faulty.
After fixing the unrelated problem and restarting everything, the multi-line regex that I show above is indeed working.
UPDATE: To give more detail, the problem had nothing to do with fail2ban
. Around the same time that I made the change to a multiline regex, I accidentally ran /etc/init.d/iptables off
instead of /etc/init.d/iptables stop
. This caused iptables
not to start up after reboot, and all my fail2ban
rules had no effect. Once I realized this error and started up iptables
properly, the multi-line regex worked fine.