Unblock an IP from fail2ban
To check if an IP is banned by fail2ban, run
1 |
zgrep "Ban" /var/log/fail2ban.log* | grep IP_ADDR_HERE |
To unblock an IP, you should find the jail that caused the IP to block.
In following example, IP 152.67.19.86 is blocked by sshd jail
1 2 |
2020-07-28 00:47:09,763 fail2ban.actions [3494]: NOTICE [sshd] Ban 152.67.19.86 2020-07-28 00:47:11,928 fail2ban.filter [3494]: INFO [sshd] Found 152.67.19.86 - 2020-07-28 00:47:11 |
To unban the IP, run
1 2 3 |
root@controlpanel:~# fail2ban-client set sshd unbanip 152.67.19.86 152.67.19.86 root@controlpanel:~# |
You can see all jails with command fail2ban-client status
1 2 3 4 5 |
root@controlpanel:/var/log# fail2ban-client status Status |- Number of jail: 4 `- Jail list: dovecot, postfix, pure-ftpd, sshd root@controlpanel:/var/log# |
See fail2ban