The following is the GNU All-permissive License as recommended in https://www.gnu.org/licenses/license-recommendations.en.html
Copyright (C) 2024 Free Software Foundation sysadmin@fsf.org
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.
Contributions are welcome. See https://savannah.gnu.org/maintenance/fsf/.
fail2ban
More fail2ban docs
Unban an IP
Login to the server in question.
Check the fail2ban.log
.
less /var/log/fail2ban.log
Log looks like this:
2021-04-12 12:59:51,344 fail2ban.filter [779]: INFO [apache-civi-newu] Found 111.222.111.222 - 2021-04-12 12:59:50
The rule name is in [brackets] followed by the IP address and a redundant timestamp.
You can find more information by comparing the syslog
.
less /var/log/syslog
You can see how the rules works by checking the config for that rule.
less /etc/fail2ban/filter.d/apache-civi-newu.conf
Un-ban syntax:
fail2ban-client set RULENAME unbanip IPADDRESS
To un-ban an ssh IP addr:
fail2ban-client set ssh unbanip 74.94.156.211
To un-ban like the above example:
fail2ban-client set apache-civi-newu unbanip 111.222.111.222
old fail2ban
There may not be an unban command for older versions of fail2ban. So you can use commands like these:
iptables -L -v -n
iptables -D fail2ban-courierauth -s 74.94.156.218 -j DROP