Page 1 of 1

How to whitelist some IP in fail2ban

Posted: Tue Aug 30, 2022 12:26 pm
by isscbta
In your SSH, as root, run:

Code: Select all

mcedit /etc/fail2ban/jail.conf
Under [DEFAULT] section, find:

Code: Select all

#ignoreip = 127.0.0.1/8 ::1
Remove # and add desired IP at the end of the line, separated with space, so the line would look like:

Code: Select all

ignoreip = 127.0.0.1/8 ::1 123.123.123.123 SomeOtherIP etc
Save the file, exit the editor, and restart fail2ban:

Code: Select all

systemctl restart fail2ban