How to whitelist an IP in Fail2ban on Debian Wheezy

Fail2Ban is used to protect servers against brute force attacks. Fail2ban uses iptables to block attackers, so, if we want to add permanent IP address and never be blocked, we must add it in the config file.

First, edit the config file :

vi /etc/fail2ban/jail.conf

Then, check the line :

ignoreip =

Add now add all ip you want. Each IP or range IP must be placed here with a space. Ex:

Save. And restart Fail2Ban:

service fail2ban restart

That's all.

Share this page:

Suggested articles

5 Comment(s)

Add comment


From: Vitaliy

Thank you! It is exactly what I am looking for.

From: Jarkko Linnanvirta


it does not work for me. Is there a way I can see the current active configuration?

From: datta


Can we add this whitelisted IP in file or any database ???

From: Suresh Kumar

It's not working for me any other suggestion please. I have added static IP address but not work for me.

From: Suresh Kumar

 I have added my static IP addresses but not work for me.