Hello Fail2banUsers,

I want to ban a list of ip's Permanently (10 IPs) when fail2ban starts. I put those 10 ips in a text file. and I have the following code:

cat /etc/fail2ban/ip.blacklist | while read IP; do iptables -I INPUT -s $IP -j DROP; done

This is to be executed once, when fail2ban starts and need to be deleted (-D) when fail2ban stops. Which is the best place I can put this code ? Is it /etc/init.d/fail2ban ?

Please suggest.

Thanks.