47 ms·
Consider fail2ban. It can be configured to automatically add (and later remove) ip addresses to iptables based on login failures (found by running regexes on l
by bigiain 13y ago
Consider fail2ban.
It can be configured to automatically add (and later remove) ip addresses to iptables based on login failures (found by running regexes on logfiles).
I've got rules blocking ip addresses with multiple failed ssh or wordpress login attempts for an hour to be very effective. I've still got a bit of "brute force poop" in the logfiles, but much less than before. I've seen a suggestion for adding an additional fail2ban "recursive rule" - dropping any ip address with repeated fail2ban lockouts for much longer times - if you trigger multiple 1 hour lockouts for ssh auth failures, you might get dropped for a week or more. I haven't felt the need to implement that one yet.