Hello Carlos,
Thanks for using Wazuh!
Although Wazuh includes rules for PFsense, it is very possible that your events are not matching our decoders or rules. Thus, you might need to create some
customer decoders and rules for your events.
You can check samples of supported PFsense events in PFsense decoders file (/var/ossec/ruleset/decoders/0455-pfsense_decoders.xml):
Nov 8 12:37:34 pfSense filterlog: 5,,,1000102433,em0,match,block,in,4,0x0,,128,24677,0,none,17,udp,186,10.9.0.119,10.9.0.255,17500,17600,166
Jan 22 18:34:00 filterlog: 65,,,0,vmx1,match,pass,out,4,0x0,,63,21011,0,none,1,icmp,56,192.168.105.11,192.168.105.1,datalength=36
In any case, I recommend you to enable
logall_json in your Wazuh Manager's configuration. This will make it dump all events into
/var/ossec/logs/archives/archives.json. In this file, you should search your PFsense events and gather the content of the field full_log. This field contains the raw log received by the Wazuh manager. You should test these raw logs against Wazuh's ruleset using wazuh-logtest-legacy tool (/var/ossec/bin/wazuh-logtest-legacy).
In case you have a correct match, you'll see an output similar to this:
root@wazuh-server:/# /var/ossec/bin/wazuh-logtest-legacy
2022/06/30 19:42:39 wazuh-testrule: INFO: Started (pid: 2374).
Since Wazuh v4.1.0 this binary is deprecated. Use wazuh-logtest instead
wazuh-testrule: Type one log per line.
Nov 8 12:37:34 pfSense filterlog: 5,,,1000102433,em0,match,block,in,4,0x0,,128,24677,0,none,17,udp,186,10.9.0.119,10.9.0.255,17500,17600,166
**Phase 1: Completed pre-decoding.
full event: 'Nov 8 12:37:34 pfSense filterlog: 5,,,1000102433,em0,match,block,in,4,0x0,,128,24677,0,none,17,udp,186,10.9.0.119,10.9.0.255,17500,17600,166'
timestamp: 'Nov 8 12:37:34'
hostname: 'pfSense'
program_name: 'filterlog'
log: '5,,,1000102433,em0,match,block,in,4,0x0,,128,24677,0,none,17,udp,186,10.9.0.119,10.9.0.255,17500,17600,166'
**Phase 2: Completed decoding.
decoder: 'pf'
id: '1000102433'
action: 'block'
protocol: 'udp'
srcip: '10.9.0.119'
dstip: '10.9.0.255'
srcport: '17500'
dstport: '17600'
length: '166'
**Phase 3: Completed filtering (rules).
Rule id: '87701'
Level: '5'
Description: 'pfSense firewall drop event.'
In case there's no match, the field "log" from this output will point you from where you need to create your decoders.
If you could provide me with some log samples, I can help you with the decoders and rules.
Looking forward to your comments!