Another thing that created havoc for me was F2B started throwing 'Script error'
all over its log file.
stderr: ‘iptables: Chain already exists.’
stderr: “iptables v1.8.4 (legacy): invalid port/service `sftp’ specified”
stderr: ‘iptables: Too many links.’
ERROR Failed to stop jail ‘postfix-sasl’ action ‘iptables-multiport’
F2B also was creating dozens of empty rules in the firewall for the sshd-dos chain.
All is documented here: Failed to execute ban jail 'ssh-ddos' action 'iptables-multiport' · Issue #3212 · fail2ban/fail2ban · GitHub
I fixed the issue by simply removing the sftp from the list of ports for jail sshd-dos and restarted F2B. All issues were gone.
Another issue was that F2B rules were being duplicated in IPTables whenever I clicked <Save Configuration>
. IPtables & Fail2Ban - Apply Configuration results in duplicates - #3 by Rory_Bremner1
This was fixed in the 'Linux IPTables Firewall'
configuration options I chose from the drop down list 'Configuration category:' > 'IPv4 configuration'
and chose 'YES'
for **Directly edit firewall IPv4 rules instead of save file?**
.