Is there a way to have a whitelisted IP address that was added by add-ip override fail2ban? Someone tried fixing their phone by changing their password, and IPBX 2020 (public version) promptly banned the entire office (about 35 phones).
Thank you.You can add their IP address in the ignoreip line of /etc/fail2ban/jail.conf and restart Fail2Ban: systemctl restart fail2ban
can I just query this because the file /etc/ actually saysadd their IP address in the ignoreip line of /etc/fail2ban/jail.conf
# Fail2Ban jail base specification file
# HOW TO ACTIVATE JAILS
#
# YOU SHOULD NOT MODIFY THIS FILE.
#
# It will probably be overwitten or improved in a distribution update.
#
# Provide customizations in a jail.local file or a jail.d/customisation.local.
# For example to change the default bantime for all jails and to enable the
# ssh-iptables jail the following (uncommented) would appear in the .local file.
# See man 5 jail.conf for details.
fail2ban-client set <JAIL> addignoreip <IP> adds <IP> to the ignore list of <JAIL>
fail2ban-client set <JAIL> delignoreip <IP> dels <IP> from the ignore list of <JAIL>
fail2ban-client set sshd addignoreip 8.8.8.8
fail2ban-client get sshd ignoreip
fail2ban-client get sshd-iptables actions | grep NOK
echo "# // End entry for $1.iptables" >> $tmpfile
echo "if [ $(/usr/bin/fail2ban-client get ssh-iptables actions | grep NOK) ]; then" >> $tmpfile
echo " /usr/bin/fail2ban-client set sshd addignoreip $2" >> $tmpfile
echo "else" >> $tmpfile
echo " /usr/bin/fail2ban-client set ssh-iptables addignoreip $2" >> $tmpfile
echo "fi" >> $tmpfile
Is there any reason you are not using a currently supported fail2ban,? All versions since 0.9 maintain state in an sqlite3 dabase which you can manipulate outside fail2ban with an sqlite3 client followed by a fail2ban-client reload --restart if needed, see the manUPDATE: Looks like a simpler way may already exist without restarting Fail2Ban:
Code:fail2ban-client set <JAIL> addignoreip <IP> adds <IP> to the ignore list of <JAIL> fail2ban-client set <JAIL> delignoreip <IP> dels <IP> from the ignore list of <JAIL>
For example,
Code:fail2ban-client set sshd addignoreip 8.8.8.8 fail2ban-client get sshd ignoreip
And the following (if not empty) will tell you the JAIL is disabled or doesn't exist:
Code:fail2ban-client get sshd-iptables actions | grep NOK
Unfortunately, whitelist entries added with fail2ban-client only last until Fail2Ban is restarted. So... see below for solution.
Link up your team and customers Phone System
Live Chat
Video Conferencing
Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.
Check your inbox!
We’ve sent you an email. Click on the button in the email body to verify your email address – (if you can not find it, check your spam folder).
Upon verification you will be directed to the 3CX setup wizard.