Permanently and persistently ban an IP with fail2ban
Solution 1:
Put the ban in your permanent iptables configuration file (possibly /etc/sysconfig/iptables
).
Solution 2:
I scoured the net for a couple hours trying to find a solid way of doing this. This article was a godsend for me!
Fail2Ban: Permanent SSH Bans. It suggests a separate file to store and recall permanently-banned IPs, which is read on fail2ban
launch and written to whenever an address is banned. A similar could be used to store bans in a database or the system-wide iptables rules.