So, I tested Fail2ban on ssh today with an IP which should have never connected to the server before.
First, the only thing I changed in the default config (apart from the mail-address) is this here:
# Choose default action. To change, just override value of 'action' with the
# interpolation to the chosen action shortcut (e.g. action_mw, action_mwl, etc) in jail.local
# globally (section [DEFAULT]) or per specific section
action = %(action_mwl)s
And I should note that SSH is on a port greater than 20000.
Now, what happened is, after 6 attempts I got the mail that my IP got blocked. So I was happy.
But then I tried logging in again, with the right details... and it worked.
So, why? What could be causing this?