Actualmente estoy teniendo problemas para instalar y configurar adecuadamente FAIL2BAN en el servidor.
He creado un fichero de configuración básico con:
Al iniciar el fail2ban, me muestra esto el log:
Code
- 2014-12-29 18:31:39,948 fail2ban.jail : INFO Creating new jail 'ssh'2014-12-29 18:31:39,948 fail2ban.jail : INFO Jail 'ssh' uses Gamin2014-12-29 18:31:40,010 fail2ban.filter : INFO Added logfile = /var/log/auth.log2014-12-29 18:31:40,010 fail2ban.filter : INFO Set maxRetry = 32014-12-29 18:31:40,011 fail2ban.filter : INFO Set findtime = 6002014-12-29 18:31:40,011 fail2ban.actions: INFO Set banTime = 864002014-12-29 18:31:40,038 fail2ban.jail : INFO Jail 'ssh' started2014-12-29 18:31:40,045 fail2ban.actions.action: ERROR iptables -N fail2ban-sshiptables -A fail2ban-ssh -j RETURNiptables -I INPUT -p tcp -m multiport --dports ssh -j fail2ban-ssh returned 100
Y si fuerzo para que me banee, me llega el mail como que estoy baneado, pero realmente no me banea, y en el log aparece esto:
Code
- 2014-12-29 18:35:12,371 fail2ban.actions: WARNING [ssh] Ban 77.225.48.60
- 2014-12-29 18:35:12,374 fail2ban.actions.action: ERROR iptables -n -L INPUT | grep -q fail2ban-ssh returned 100
- 2014-12-29 18:35:12,374 fail2ban.actions.action: ERROR Invariant check failed. Trying to restore a sane environment
- 2014-12-29 18:35:12,387 fail2ban.actions.action: ERROR iptables -N fail2ban-ssh
- iptables -A fail2ban-ssh -j RETURN
- iptables -I INPUT -p tcp -m multiport --dports ssh -j fail2ban-ssh returned 100
- 2014-12-29 18:35:12,390 fail2ban.actions.action: ERROR iptables -n -L INPUT | grep -q fail2ban-ssh returned 100
- 2014-12-29 18:35:12,390 fail2ban.actions.action: CRITICAL Unable to restore environment
He estado mirando por foros y preguntando a mi amigo google, pero todo lo que he probado no funciona.
Tengo i-MSCP Git 1.1.x
Debian GNU/Linux 7 x86_64