I using fail2ban v.0.8.2 but I can't unban an IP:
with fail2ban-client I see IP:
fail2ban-client status fail2ban
Status for the jail: fail2ban
|- filter
| |- File list: /var/log/fail2ban.log
| |- Currently failed: 1
| `- Total failed: 8
`- action
|- Currently banned: 2
| `- IP list: 151.10.65.197 151.10.72.169
`- Total banned: 2
from man page should be sufficiently do:
fail2ban-client get fail2ban actionunban 151.10.65.197
output of command does not return error but:
iptables -L -nv |grep -b2 -a1 151
16262- pkts bytes target prot opt in out source destination
16351: 0 0 DROP all -- * * 151.10.72.169 0.0.0.0/0
16440: 0 0 DROP all -- * * 151.10.65.197 0.0.0.0/0
16529- 181K 48M RETURN all -- * * 0.0.0.0/0 0.0.0.0/0
and the output of
fail2ban-client status fail2ban
is same of above, hence command does not run.
Find the banned IP address in the file /var/log/fail2ban. log to identify which jail has banned it.
You need to use fail2ban-client get jail-name actionunban ipaddress
That will allow you to unban an IP address. Use iptables -L -n
to find the status of the correct jail-name to use?. The command you are giving: fail2ban-client get fail2ban actionunban xxx.xxx.xxx.xxx
is correct given your output. Check status again to make sure it has not already been unblocked by the timeout. That would explain why the command fails.
Here is a good page Fail2ban Manual Unban Single Host (for iptables) There have been changes to the unban procedure syntax (get/set) depending on version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With