fail2ban banned my ip for SSH. In email I received that said I got banned via fail2ban after 5 attempts against SSH. Which is not even truth i wasn't even loging to SSH. I can still access webmin. I shut down fail2ban and still same. For iptables -L it shows this.

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
fail2ban-SSH  tcp  --  anywhere             anywhere            tcp dpt:ssh 

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain fail2ban-SSH (1 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere            

I tried with

fail2ban-client set ssh-iptables unbanip myIP
then it returned this:
IP myIP is not banned

I tried with this too:

iptables -D fail2ban-ssh-iptables -s myIP -j DROP

And didn't recieve anything and I am still banned.

> fail2ban-client status
|- Number of jail:  1
`- Jail list:       ssh-iptables

I am also getting a lot of this emails:

Banned the following ip addresses on Thu Nov 14 20:05:01 EST 2013

282 with 282 connections

xxx xxx numbers different

  • Your firewall shows that nobody is banned. Why do you think you are? – Michael Hampton Nov 15 '13 at 5:06

You are trying to use this command on the chain fail2ban-ssh-iptables:

iptables -D fail2ban-ssh-iptables -s myIP -j DROP

But your iptables –L –n shows repeated references to the chain fail2ban-SSH which is the chain that is string the fail2ban rules. So that command should be:

iptables -D fail2ban-SSH -s myIP -j DROP
  • i did iptables -D fail2ban-SSH -s myIP -j DROP and get this (didn't shown this in webmin) iptables: Bad rule (does a matching rule exist in that chain?). – Luka Tce Nov 15 '13 at 16:01
  • Did you replace the myIP in that command with your IP address? – JakeGould Nov 15 '13 at 17:06
  • Yep i replaced it – Luka Tce Nov 15 '13 at 17:15
  • Anyone pls help Now i am totaly locked out. Webpage don't work same webmin Serial Console on solusVM don't work Shut down then boot don't work – Luka Tce Nov 15 '13 at 20:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.