Hi all,
I am working with pfSense firewall logs in Wazuh (syslog → manager), and I am trying to refine a rule to detect new outbound destinations while excluding internal DNS traffic.
Detect new outbound destination IPs from LAN hosts, excluding:
<rule id="100550" level="10">
<if_sid>100540</if_sid>
<list field="data.dstip" lookup="not_match_key">etc/lists/expected-dst</list>
<description>New external destination detected</description>
</rule>This works correctly using data.dstip.
I want to exclude DNS traffic (dstip = 10.9.9.48).
<not_field name="data.dstip">10.9.9.48</not_field>→ Wazuh fails to start (Invalid option 'not_field')
<rule id="100650" level="10">
<if_sid>100540</if_sid>
<dstip negate="yes">10.9.9.48</dstip>
<list field="data.dstip" lookup="not_match_key">etc/lists/expected-dst</list>
</rule>→ Wazuh starts, but the rule produces no alerts.
data.dstip is clearly populated and works in the list lookup.<dstip> does not appear to match the same events.data.dstip and canonical dstip.Example alert (sanitised):
{
"rule": { "id": "100550" },
"data": {
"srcip": "10.9.9.25",
"dstip": "8.8.8.8"
}
}<dstip> match when data.dstip is present, or are these independent?data.dstip?data.dstip)?data.dstip<dstip> causes rule to stop matchingAny guidance would be much appreciated.
Thanks in advance.
In your case, if the event is decoded with data.dstip, this could be the correct pattern:
So the likely reason your <dstip negate="yes">10.9.9.48</dstip> version stopped matching is that the event is carrying data.dstip, not the static dstip field.