I wanted to mention that Webmin comes with Fail2ban support now.
Documentation for setting it up is here:
https://www.virtualmin.com/documentation/security/fail2ban