Fail2Ban
Fail2Ban is a tool that can help to protect services from malicious activity by scanning log files for suspicious activity and banning IPs that exhibit malicious activity. It can update firewall rules to reject the IPs for a specified period of time and comes with filters for several services. While Fail2Ban can help to reduce the risk of incorrect authentication attempts, the best way to protect services is to use two-factor or public/private authentication mechanisms.
Warning!
Weak authentication methods can leave your services vulnerable to malicious activity. Use two-factor or public/private authentication methods to ensure your services are adequately protected.