Permanent ban with Fail2ban


If you are banning IP addresses using Fail2ban, there is little need to unban them (unless you ban yourself accidentally). So I always set my ban time to infinite:


# "ignoreip" can be an IP address, a CIDR mask or a DNS host
ignoreip = yourip anotheripyouuse
bantime  = -1
maxretry = 3

The key here was to set bantime to a negative number. You might be interested in my post on parsing Fail2ban logs.