1

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
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

1
  • Your firewall shows that nobody is banned. Why do you think you are? Nov 15, 2013 at 5:06

1 Answer 1

1

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
4
  • 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, 2013 at 16:01
  • Did you replace the myIP in that command with your IP address? Nov 15, 2013 at 17:06
  • Yep i replaced it
    – Luka Tce
    Nov 15, 2013 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, 2013 at 20:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .