If your like me and manage to ban your own ip this how to fix it.
Log into the linode manager.
Click on the remote access tab.
In the console access click the ‘Lish via Ajaxterm Launch Lish Ajax Console’ link. This will launch a shell in the browser. Login with your username and password and become a superuser:
- Check if you are indeed banned (replace 192.168.1.1 with your ipaddress):
iptables -L -n | grep 192.168.1.1
If you get a line like the one below you have been banned.
DROP all -- 192.168.1.1 0.0.0.0/0
- Determine the name of the jail your in.
iptables -L | grep fail2ban
This should give you an output similar to this.
fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh Chain fail2ban-ssh (1 references)
In my case there was only 1 entry, fail2ban-ssh.
- Use this in your next query to remove your ip:
iptables -D fail2ban-ssh -s 192.168.1.1 -j DROP
You should now be unbanned and can log out of the web console.