TecMint published a tutorial about installing Fail2ban on Rocky Linux and AlmaLinux.
How to Install Fail2ban on Rocky Linux and AlmaLinux
Fail2ban is an Intrusion Prevention System that works in conjunction with Firewalld to ban clients after a specific number of failed login attempts.
How to Install Fail2ban on Rocky Linux and AlmaLinux