-2

I am on Centos 6.9 with fail2ban 0.9.6. I have the below SSH jail but after restarting fail2ban it is not enabled when running fail2ban-client status.

The conf I used is /etc/fail2ban/jail.local. I have multiple jails in there.

[ssh]
enabled = true
filter = sshd
action = iptables-multiport[name=SSH, port="2222", protocol=tcp]
maxretry = 3
logpath  = /var/log/secure
bantime = 86400

Any help much appreciated.

Thanks.

UPDATE

I got it resolved after all.. It was the space in front of the directives.

Olive.b
  • 52
  • 1
  • 2
  • 10
  • I remember it was `banaction`, not just `action`, not sure tho.. I'm using ufw, and I have it like: `banaction = ufw-ssh` – aPugLife Mar 30 '18 at 13:31
  • It would be kind if you could post your resolution as an answer, including the config changes you made. That would make it easier for other people with the same issue to find the solution. – Jenny D Apr 01 '18 at 09:31

1 Answers1

-1

I got it resolved after all.. It was the space in front of the directives.

[ssh]
enabled = true
filter = sshd
action = iptables-multiport[name=SSH, port="2222", protocol=tcp]
maxretry = 3
logpath  = /var/log/secure
bantime = 86400
Olive.b
  • 52
  • 1
  • 2
  • 10