In case an IP gets banned by fail2ban and you want to remove it: The following command gives you an overview of all chains and the banned IPs along with their corresponding number.

iptables -L -n --line-numbers

To unban an IP use this command with the correct chain and number:

iptables -D fail2ban-ssh 2

Another method is the usage of fail2ban-client:

fail2ban-client set sasl unbanip IP