These two together will create the old grouping of direct firewall rules as alma 10 seems to be very picky on how this functions, out of the box on alma 10 it does not without these changes.
Below is a more complete .local file with the email system setup.
# /etc/fail2ban/jail.local
[DEFAULT]
# Where to email ban notifications
destemail = youremail@domain.com
# Envelope-from / From:
sender = fail2ban@domain.net
sendername = Fail2Ban
# What to send (ban + whois + matching log lines)
action = %(action_mwl)s
# Use firewalld backend on Alma family (entirely drop the IP)
banaction = firewallcmd-ipset[actiontype="", blocktype=DROP]
Normal jail configuration would follow after the above section.
I have gone ahead and adjusted the proftp settings that virtualmin ships with in the jai.local.
Reason for doing all this, the default config works out the box however, no log lines are emailed with the action %(action_mwl)s[]
Also, i notice with the default virtualmin config the jail status counters do not increase with each failed attempt, you only get the IP blocked when it reaches the max number of attempts. This might be something weird with my configuration but wanted to share this in case someone else wanted a known working config.
Chatgpt also rewrote the regex as it seemed to think it was limited to detecting IPv4 only?
I’ve gone ahead and stuck the new regex under fail2ban/log filters/proftpd.
Would be nice if someone could fully review the setup for fail2ban / proftp as regex really does not live in the jail.conf and it trips a lot of the log detection up it seems and only banning and not really reporting the log lines properly in emails etc.
Just to confirm, the changes I have made are producing proper log tracking within Fail2Ban and emails contain actual lines from proFTP whereas they did not before.
You will also be pleased to know the FTP feed is now working in this setup with AbuseIPDB as it’s getting the log lines etc now - https://www.abuseipdb.com/user/240539