How to whitelist some IP in fail2ban
Posted: Tue Aug 30, 2022 12:26 pm
In your SSH, as root, run:
Under [DEFAULT] section, find:
Remove # and add desired IP at the end of the line, separated with space, so the line would look like:
Save the file, exit the editor, and restart fail2ban:
Code: Select all
mcedit /etc/fail2ban/jail.conf
Code: Select all
#ignoreip = 127.0.0.1/8 ::1
Code: Select all
ignoreip = 127.0.0.1/8 ::1 123.123.123.123 SomeOtherIP etc
Code: Select all
systemctl restart fail2ban