I use fail2ban to stop annoying things like ssh brute-force attacks, etc. This isn’t really to stop the attack, but rather to stop the attack traffic from filling up my logs.
Sometimes I accidentally manage to get my own address blocked, or need to unblock a specific address.
Step 1: Confirm the fail2ban really is what is blocking the address:
user> sudo fail2ban-client 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.0.2.1
To remove the IP:
user> sudo fail2ban-client set sshd unbanip 192.0.2.1