/etc/fail2ban/filter.d/dovecot.conf
[Definition]
failregex = dovecot-auth: pam_unix\(dovecot:auth\):
authentication failure; .* rhost=
ignoreregex =
/etc/fail2ban/jail.conf
[dovecot-iptables]
enabled = true
filter = dovecot
action = iptables-multiport[name=Dovecot, port="pop3,pop3s,imap,imaps", protocol=tcp]
sendmail-whois[name=Dovecot, dest=you at mail.com]
logpath = /var/log/secure
maxretry = 5
bantime = 1800
ignoreip = 127.0.0.1
This works quite well. No more worry on unlimited meaningless break-in trials on port 110 and port 143.
1 comment:
I'm noticing that fail2ban appears to have modified netfilter using iptables, but not ip6tables, so IPv6 is unaffected. Does this appear to be the case for you?
Post a Comment