Я пытаюсь отключить уведомления по электронной почте для правила 5758 OSSEC.
<rule id="5758" level="8">
<decoded_as>sshd</decoded_as>
<match>^error: maximum authentication attempts exceeded </match>
<description>Maximum authentication attempts exceeded.</description>
<group>authentication_failed,</group>
</rule>
В /var/ossec/rules/local_rules.xml я добавил это настраиваемое правило:
<rule id="100002" level="8">
<if_sid>5758</if_sid>
<description>No mail for max auth SSH</description>
<options>no_email_alert</options>
</rule>
Но это правило не действует.
Necessiteu
Nivell 0 significa ignorat / no s'ha realitzat cap acció. Encara explorarà el fitxer. Ho tinc al meu /var/ossec/rules/sshd_rules.xml
. Només cal canviar el nivell a zero. Si voleu conservar els canvis locals en un fitxer diferent, podeu fer-ho al fitxer local_rules.xml, que probablement sigui una millor manera de gestionar-ho. Bàsicament, mantingueu la regla original a sshd_rules.xml i sobreescriviu-la mitjançant regles locals.
la regla principal a /sshd_rules.xml:
<rule id="5758" level="8">
<decoded_as>sshd</decoded_as>
<match>^error: maximum authentication attempts exceeded </match>
<description>Maximum authentication attempts exceeded.</description>
<group>authentication_failed,</group>
</rule>
i després a local_rules:
<rule id="100002" level="0">
<if_sid>5758</if_sid>
<description>No mail for max auth SSH</description>
<options>no_email_alert</options>
</rule>