For some reason, the alert is generated, but it does not trigger the active response.
Example event:time=01:29:31 devname=\"fw-externo-noreste\" devid=\"FGT80FTK24019981\" eventtime=1775795371000172379 tz=\"-0300\" logid=\"0101037128\" type=\"event\" subtype=\"vpn\" level=\"error\" vd=\"root\" logdesc=\"Progress IPsec phase 1\" msg=\"progress IPsec phase 1\" action=\"negotiate\" remip=167.58.119.189 locip=164.73.250.190 remport=500 locport=500 outintf=\"wan1\" srccountry=\"Uruguay\" cookies=\"fb2101e854550ca6/0000000000000000\" user=\"N/A\" group=\"N/A\" useralt=\"N/A\" xauthuser=\"N/A\" xauthgroup=\"N/A\" assignip=N/A vpntunnel=\"N/A\" status=\"failure\" init=\"remote\" exch=\"SA_INIT\" dir=\"inbound\" role=\"responder\" result=\"ERROR\" version=\"IKEv2\" fctuid=\"N/A\" advpnsc=0","decoder":{"name":"fortigate-firewall-v5"},"data":{"action":"negotiate","srcip":"167.58.119.189","dstuser":"N/A","status":"failure","assignip":"N/A","cookies":"fb2101e854550ca6/0000000000000000","devid":"FGT80FTK24019981","devname":"fw-externo-noreste","eventtime":"1775795371000172379","group":"N/A","level":"error","locip":"164.73.250.190","locport":"500","logdesc":"Progress IPsec phase 1","logid":"0101037128","msg":"progress IPsec phase 1","outintf":"wan1","remport":"500","srccountry":"Uruguay","subtype":"vpn","time":"01:29:31","type":"event","vd":"root","vpntunnel":"N/A","xauthgroup":"N/A","xauthuser":"N/A"},"location":"164.73.191.51"}
Hi,
I have reviewed the configuration and rules you shared, and it seems some corrections are required.
Regarding your active response configuration in the Wazuh manager ossec.conf file, I can see that there are two <active-response> blocks triggering the same script, with no difference in location or timeout. The only difference is the rule IDs used.
Instead of maintaining multiple blocks, you can simplify this by using a single <active-response> block and including all rule IDs together, as shown below:
In the case of your custom rules, rule IDs 100850 and 100852 require a syntax correction.
You have used <same_srcip/>, but this will not work because there is no field named srcip in the decoded event. The source IP is mapped to the remip field.
Because of this, the rule will not trigger as expected. You should replace <same_srcip/> with:
<same_field>remip</same_field>
This ensures the rule checks whether the remip value is the same before triggering.
You can use the updated rules below:
I have tested these rules, and they are working fine on my end.
Regarding the active response not being triggered, could you please share the custom script you are using for testing? This will help us replicate the setup and assist you more effectively.
You can also refer to the Wazuh documentation for custom active response and rule syntax for further details.


Good morning.
In the direct configuration for remip and srcip, I changed it in /var/ossec/ruleset/decoders/0100-fortigate_decoders.xml so it would work properly:
<decoder name="fortigate-firewall-v5">
<parent>fortigate-firewall-v5</parent>
<regex>remip="(\.*)"|remip=(\.*)\s|remip=(\.*)$</regex>
<order>remip</order>
</decoder>
to:
<decoder name="fortigate-firewall-v5">
<parent>fortigate-firewall-v5</parent>
<regex>remip="(\.*)"|remip=(\.*)\s|remip=(\.*)$</regex>
<order>srcip</order>
</decoder>
Hi,
Apologies for the late response.
If the issue is occurring only for a specific rule ID, I recommend enabling debug logging in your custom script to capture detailed execution logs. This will help identify what is causing the issue.
Could you please share the active response script with us? I can test it on my end and assist you better.
If the issue is limited to a specific rule while other rule IDs are triggering the active response correctly, it is likely that the problem is within the custom script logic for that case.
Enabling debug logs in the script will make it easier to identify the root cause.
You can also refer to the Wazuh documentation on custom active response for a better understanding of how it works.
Please share the script for further analysis.