Fail2Ban is a popular and powerful tool used to protect Linux servers against brute force attacks. Fail2ban uses iptables to block attackers trying to login to your server. In order to avoid Fai2ban from blocking yourself out, you will want to add your origin IP addresses to the white-list. In this case you should add it to the config file as follows:

 

1. Edit the config file by using vi or any other text editor:

vi /etc/fail2ban/jail.conf

 

2. Then, look for the line :

ignoreip =

Example:

ignoreip = 10.10.10.1 192.168.1.0/24

 

3. Add now add all IP addresses you want to Fail2ban to ignore and avoid from blocking. Each IP or IP subnet must be separated with a whitespace. For instance: 10.10.10.1 192.168.1.0/24

Don’t forget to add the ignoreip line in the [DEFAULT] section of the file.

 

4. Save the file and restart Fail2Ban:

service fail2ban restart

 

That's all there is to it. 

 

 

Deploy on a  VPS server now

or

Deploy on a dedicated server now

Was this answer helpful? 0 Users Found This Useful (0 Votes)