I’m going to pre-announce something, which I don’t normally do, but it’s directly relevant, and the web page and backend service is up and running.
For the past several weeks, I’ve been working on a replacement for fail2ban, and Ilia is recently helping polish up the Webmin module…we plan to ship it in the next major version of Virtualmin.
I’ve been running it on my servers from almost the first weekend of development, and it’s mostly pretty solid for everything I used fail2ban and sshguard for, while being significantly smaller and more efficient than either.
I recently noticed it’s relying on some stuff that isn’t present on older EL versions, though…since you’re on AlmaLinux 8, you might find it complains about unknown values in the systemd unit, but I think it still works. I only recently started testing on older systems, so didn’t notice earlier…but, also since EL 8 reached the end of full maintenance in 2024, and is only getting security updates and we probably won’t try to support it with the next major version of the Virtualmin installer (we don’t support distros in the installer past that fully maintained period, but we keep supporting EL throughout the security lifecycle for our own package updates).
Anyway, that’s me saying there is an alternative for CSF and fail2ban that I’ll begin recommending pretty soon, and it’s what we’ll be shipping in our products/projects. It does everything I used fail2ban or sshguard for, and I believe it does all of the intrusion prevention stuff CSF does (though I’ve never used CSF), and it does it in a much lighter way, pushing all of the complexity down into the kernel layer…nftables rules carry their own expiration, for example, so we don’t have to store a bunch of metadata about the banned IPs.
It works with nftables natively, but also works in a firewalld or iptables system that’s using the nftables backend, as it creates and manages its own nftables rules. But, since you don’t need firewalld, that’s another bit of complexity you can drop.
Whether you want to use it in production is up to you; you can also run it alongside another tool. It coexists with fail2ban (though depending on configuration, one or the other may not ever reach a bannable limit, since the IP might already be blocked by the other tool).
I welcome bug reports, and discussion of features that you use in CSF or fail2ban or whatever that aren’t covered by minsec. I won’t promise to implement every feature; being extremely, shockingly, tiny, is a hard requirement for minsec, but if it’s not resource intensive, I’ll certainly consider adding anything you think it ought to have. I’ll also note that minsec has features that fail2ban (and maybe CSF) don’t have…crowd-sourced ban lists and an RBL interface. I think the API and CLI are notably better, as well.