If you need to whitelist an IP address in fail2ban, you can do so by following these simple steps.
Edit /etc/fail2ban/jail.conf in your favorite text editor
Search for the following section. It should be near the top of the file:
[DEFAULT]
# “ignoreip” can be an IP address, a CIDR mask or a DNS host. Fail2ban will not
# ban a host which matches an address in this list. Several addresses can be
# defined using space separator.
ignoreip = 127.0.0.1/8
Add your IP address to the ignoreip line. This line is space delimited. so like this:
ignoreip = 127.0.0.1/8 192.168.0.1 8.8.8.8
Once you have done this, go ahead and restart fail2ban with “service fail2ban restart” and you are all set.