[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: fail2ban: varias acciones en un mismo "jail".



El Thu, 12 Mar 2015 15:08:10 +0000, Camaleón escribió:

> El Wed, 11 Mar 2015 22:28:12 +0100, José Miguel (sio2) escribió:
> 
>> Tengo instalado en jessie fail2ban (0.8.13) y he intentado ejecutar dos
>> acciones dentro de un mismo jail. Básicamente lo que he hecho es crear
>> un jail.local con el siguiente contenido:
>> 
>> #v+
>> [ssh]
>> 
>> action = iptables-multiport[name=SSH, port=ssh, protocol=tcp, chain=INPUT]
>>          iptables-multiport[name=SSH, port=ssh, protocol=tcp, chain=FORWARD]
>> #v-
>> 
>> Lo que esperaba es que se creara dos reglas, una en la cadena INPUT y otra en
>> la cadena FORWARD, pero sólo se ha creado una en FORWARD:
> 
> (...)
> 
> Interesante...
> 
> ¿Será por el formato (indentado)? :-?
> 
> http://sourceforge.net/p/fail2ban/mailman/message/32127985/

(...)

Y también he visto esto en el manual¹ (no mencionada nada del formato):

***
   Actions
       Each jail can be configured with only a single filter, but may have
       multiple actions. By default, the name of a action is the action
       filename, and in the case of Python actions, the ".py" file extension is
       stripped. Where multiple of the same action are to be used, the actname
       option can be assigned to the action to avoid duplication e.g.:

       [ssh-iptables-ipset]
       enabled = true
       action = smtp.py[dest=chris@example.com, actname=smtp-chris]
                smtp.py[dest=sally@example.com, actname=smtp-sally]
***

Es decir, parece indicar que hay que usar la variable "actname=reglaN" 
para identificar unívocamente dos acciones que son iguales :-?

¹http://manned.org/jail.conf.5

Saludos,

-- 
Camaleón


Reply to: