Adding timeout to iptables rules where they rule is dropped automatically?
Is anybody using such a thing in production?
I'm seeing fail2ban as an option to do this and I'm not really eager to add some complexity. I'd probably consider fail2ban if this was a webserver where I can ban bots bruteforcing wp-login.php since its able to do that.
Does anybody have a bash script or recommend something within iptables to set a block and drop it after specified time? I've searched online and find a bunch of 10+ year outdated stuff or recommendations to fail2ban.
Basically I'm trying to block IP addresses / IP blocks I catch spamming to keep the spam off the 5 mailservers I run.