Fail2Ban: How to unban IPs
Fail2Ban: How to unban IPs
Description
Fail2Ban: ban hosts that cause multiple authentication errors
List of BAN IPS
1
sudo zgrep 'Ban' /var/log/fail2ban.log*
or
1
sudo fail2ban-client banned
Fail2ban prompt
1
sudo fail2ban-client -i
Check the status of sshd
1
status sshd
Status for the jail: sshd
|- Filter
| |- Currently failed: 0
| |- Total failed: 3
| `- File list: /var/log/auth.log
`- Actions
|- Currently banned: 1
|- Total banned: 1
`- Banned IP list: 192.168.1.54
Unban IP 192.168.1.54
1
set sshd unbanip 192.168.1.54
1
Check the status again
1
status sshd
Status for the jail: sshd
|- Filter
| |- Currently failed: 0
| |- Total failed: 3
| `- File list: /var/log/auth.log
`- Actions
|- Currently banned: 1
|- Total banned: 1
`- Banned IP list:
Sources
Fail2Ban https://github.com/fail2ban/fail2ban
Basic Fail2ban commands https://bornoe.org/blog/2023/09/basic-fail2ban-commands/
Want to thank me?
🤝 Buy me a coffee https://buymeacoffee.com/dbplatz
This post is licensed under CC BY 4.0 by the author.