How to definitely ban an IP in your server via SSH

A permanent ban of an IP that tries to connect to your linux server can be done with iptables but with a tweak in Fail2Ban.

As the issue with Fail2Ban/iptables will be that everytime that you restart Fail2Ban, the IP will disappear.

So we will create a file to store them forever.

More : how to definitely ban an IP with Fail2Ban.