Repository navigation
Configuration Files
This directory contains the SIEM-side configuration files for the pfSense SIEM stack (Logstash pipeline, OpenSearch index templates) plus the Suricata SID tuning lists and a pfBlockerNG DNSBL whitelist that live on the pfSense side.
Logstash pipeline for Suricata EVE JSON logs
Purpose:
- Receives Suricata events via UDP from the pfSense forwarder
- Parses the JSON to flat root-level fields (
event_type,src_ip,dest_ip,in_iface,alert.signature,geoip_src.location, ...). Nothing is nested under asuricata.eve.*prefix; the dashboards query the flat names. - Indexes to OpenSearch with daily indices (
suricata-YYYY.MM.DD)
Deployment:
sudo cp config/logstash-suricata.conf /etc/logstash/conf.d/suricata.conf
sudo systemctl restart logstashConfiguration options:
-
port => 5140- UDP listen port (must match the forwarder) -
hosts => ["http://localhost:9200"]- OpenSearch endpoint -
index => "suricata-%{[@metadata][index_date]}"- Index naming pattern
See inline comments in the file for detailed documentation.
OpenSearch index template for suricata-* indices — installed as _index_template/suricata-template
Purpose:
- Defines field mappings (geo_point, keyword, ip, integer)
- Configures index settings (1 shard, 0 replicas, 5 s refresh)
- Ensures proper GeoIP mapping for geomap panels
Deployment:
# Automated (recommended) — applies both templates and the auto-create setting
./scripts/install-opensearch-config.sh
# Manual
curl -X PUT "http://localhost:9200/_index_template/suricata-template" \
-H 'Content-Type: application/json' \
-d @config/opensearch-index-template.jsonKey mappings (flat root-level fields):
-
geoip_src.location/geoip_dest.location- geo_point (for geomap) -
in_iface,event_type,proto,alert.category,alert.action- keyword (for aggregations) -
alert.signature- text with a.keywordsub-field;alert.signature_id- integer -
src_ip,dest_ip- ip
OpenSearch index template for pfblockerng-* indices — installed as _index_template/pfblockerng
Purpose:
- Maps pfBlockerNG tag fields as
keywordtype for aggregations - Uses
dynamic_templatesfortag.*,tail_ip_block_log.*andtail_dnsbl_log.*fields - Ensures proper field types for the Grafana dashboard panels
Deployment:
# Automated (recommended)
./scripts/install-opensearch-config.sh
# Manual
curl -X PUT "http://localhost:9200/_index_template/pfblockerng" \
-H 'Content-Type: application/json' \
-d @config/opensearch-pfblockerng-template.jsonData pipeline: Telegraf [[outputs.opensearch]] on pfSense → OpenSearch pfblockerng-* indices. See Telegraf pfBlockerNG Setup.
Important: Do NOT use
[[outputs.elasticsearch]]for pfBlockerNG data — it is incompatible with OpenSearch 2.x. Use[[outputs.opensearch]](Telegraf ≥ 1.28).
DNS blocklist whitelist - Domains to exclude from pfBlockerNG DNSBL blocking
Usage: Curated list of domains whitelisted in the maintainer's pfBlockerNG DNSBL configuration to prevent false positives for legitimate services (identity providers, CDNs, certificate validation, streaming, gaming, productivity tools, ...). Review it and remove anything you do not use before importing.
Format:
example.com
subdomain.example.com
.example.com # wildcard
Integration: Firewall → pfBlockerNG → DNSBL → create a group with List Action Whitelist and paste the contents (or point it at the raw GitHub URL). The categories and the privacy notes behind them are explained in docs/pfsense/PFBLOCKERNG_FEED_REFERENCE.md.
The pfBlockerNG feed catalog that used to live in this directory as pfblockerng_optimization.md is now docs/pfsense/PFBLOCKERNG_FEED_REFERENCE.md. The shorter strategy guide is docs/pfsense/PFBLOCKERNG_OPTIMIZATION.md.
Suricata SID management lists for the pfSense Suricata package:
config/sid/
├── README.md # What the lists do, how they were derived, how to build and apply your own
├── disable/disablesid.conf # 218 SIDs that are never loaded (protocol anomalies, chat/P2P, INFO noise, ...)
├── drop/dropsid-minimal-safe.conf # Six high-confidence classtypes to convert from alert to drop (start here)
├── drop/dropsid-comprehensive.conf # Tiered classtype drop list for more aggressive inline IPS
└── suppress/suppress.conf # 2 example IP-specific suppressions (replace with your own)
They are applied through Services → Suricata → SID Mgmt (and the Suppress tab), which stores them in config.xml so they survive rule updates and pfSense upgrades. See sid/README.md.
| Template name | Index pattern | Source file | Purpose |
|---|---|---|---|
suricata-template |
suricata-* |
opensearch-index-template.json |
Suricata EVE events (geo_point, keyword, ip mappings) |
pfblockerng |
pfblockerng-* |
opensearch-pfblockerng-template.json |
pfBlockerNG IP block & DNSBL events (keyword mappings) |
Apply both:
./scripts/install-opensearch-config.shCRITICAL: OpenSearch must be allowed to auto-create new daily indices for both suricata-* and pfblockerng-*, otherwise ingestion stops at midnight UTC when the index name changes. install-opensearch-config.sh sets this. To set or check it by hand:
curl -XPUT "http://<SIEM_IP>:9200/_cluster/settings" \
-H 'Content-Type: application/json' \
-d '{
"persistent": {
"action.auto_create_index": "pfblockerng-*,suricata-*,.monitoring-*,.watches,.triggered_watches,.watcher-history-*,.ml-*"
}
}'
curl -s "http://<SIEM_IP>:9200/_cluster/settings?filter_path=persistent.action.auto_create_index"Background, symptoms and emergency recovery: docs/troubleshooting/OPENSEARCH_AUTO_CREATE.md.
-
Install SIEM stack:
sudo ./install.sh
-
Configure environment:
cp config.env.example config.env nano config.env # Set SIEM_HOST and PFSENSE_HOST -
Deploy configuration:
./setup.sh # Automated deployment
Logstash:
# Copy config
sudo cp config/logstash-suricata.conf /etc/logstash/conf.d/suricata.conf
# Test config
sudo /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/suricata.conf --config.test_and_exit
# Restart
sudo systemctl restart logstash
# Verify
sudo systemctl status logstash
tail -f /var/log/logstash/logstash-plain.logOpenSearch:
# Apply both index templates and the auto-create setting
./scripts/install-opensearch-config.sh
# Or manually:
curl -X PUT "http://localhost:9200/_index_template/suricata-template" \
-H 'Content-Type: application/json' \
-d @config/opensearch-index-template.json
curl -X PUT "http://localhost:9200/_index_template/pfblockerng" \
-H 'Content-Type: application/json' \
-d @config/opensearch-pfblockerng-template.json
# Verify templates
curl -s "http://localhost:9200/_index_template/suricata-template" | jq
curl -s "http://localhost:9200/_index_template/pfblockerng" | jq
# Check indices
curl -s "http://localhost:9200/_cat/indices/suricata-*?v"
curl -s "http://localhost:9200/_cat/indices/pfblockerng-*?v"Suricata:
# Send test event to Logstash
echo '{"timestamp":"2025-11-27T12:00:00.000000-0500","event_type":"test","src_ip":"192.0.2.10","in_iface":"igc0"}' | nc -u localhost 5140
# Check in OpenSearch (wait 2-3 seconds)
curl -s "http://localhost:9200/suricata-*/_search?q=event_type:test" | jq '.hits.total.value'pfBlockerNG:
curl -s "http://localhost:9200/pfblockerng-*/_count" | jq '.count'# geoip_src.location must be geo_point (flat structure, no suricata.eve prefix)
curl -s "http://localhost:9200/suricata-*/_mapping" | jq '.[].mappings.properties.geoip_src.properties.location'Expected:
{
"type": "geo_point"
}Edit config/logstash-suricata.conf:
input {
udp {
port => 5140 # Change to your port
Also update the forwarder on pfSense (scripts/forward-suricata-eve.py):
LOGSTASH_PORT = 5140 # Match Logstash portEdit config/logstash-suricata.conf:
output {
opensearch {
hosts => ["http://localhost:9200"]
user => "admin" # Add username
password => "admin" # Add password
ssl => true # Enable SSL
Edit config/logstash-suricata.conf:
output {
opensearch {
index => "myindex-%{+YYYY.MM.dd}" # Custom prefix
Then update the index pattern in opensearch-index-template.json, the action.auto_create_index list, and the Grafana datasource (myindex-*).
# Check UDP listener
sudo ss -ulnp | grep 5140
# Check firewall
sudo ufw status | grep 5140
# Allow if needed
sudo ufw allow 5140/udp
# Test with tcpdump
sudo tcpdump -i any -n udp port 5140# Check Logstash logs
tail -f /var/log/logstash/logstash-plain.log | grep -i error
# Check pipeline stats
curl -s localhost:9600/_node/stats/pipelines | jq
# Verify OpenSearch reachable
curl -s http://localhost:9200/_cluster/healthNew daily index not auto-created. Re-run ./scripts/install-opensearch-config.sh or apply the action.auto_create_index setting shown above, then check Logstash for index_not_found_exception. Full write-up: docs/troubleshooting/OPENSEARCH_AUTO_CREATE.md.
# Delete and recreate both templates
curl -X DELETE "http://localhost:9200/_index_template/suricata-template"
curl -X DELETE "http://localhost:9200/_index_template/pfblockerng"
./scripts/install-opensearch-config.sh
# Templates only apply to indices created after them. To remap existing
# indices you must delete them (WARNING: deletes data!)
curl -X DELETE "http://localhost:9200/suricata-*"
curl -X DELETE "http://localhost:9200/pfblockerng-*"- Logstash Pipeline - See inline comments for detailed config
- Suricata Template - Suricata field mappings
- pfBlockerNG Template - pfBlockerNG field mappings
- SID Management - Suricata disable/drop/suppress lists
- Telegraf pfBlockerNG Setup - OpenSearch output config
- Configuration Guide - All config.env options
- SIEM Installation - Full setup guide
- OpenSearch Auto-Create - Fix midnight UTC issue
- Troubleshooting - Common config issues
For complete documentation, see docs/DOCUMENTATION_INDEX.md
Source: config/README.md. This wiki is generated from the repository on every push to main; edit the source file and open a pull request rather than editing the wiki page.
This wiki is generated from the Markdown files in pfsense-siem-stack on every push to main. Edits made here are overwritten; edit the source file named at the bottom of each page and open a pull request. Placeholders used throughout: admin@<PFSENSE_IP> is your pfSense SSH login, <SIEM_IP> your SIEM server, interface names like igc0 are examples. Licensed MPL 2.0.
Getting started
Suricata
pfBlockerNG
Telegraf
pfSense platform
- Upgrading pfSense ⭐
- Filterlog Stops After Rotation
- Traffic Shaping Guide
- Shaping Optimization Notes
- October 2026 Tuning Results
- CrowdSec (exploratory)
SIEM: deploy
- Quick Start
- New User Checklist
- SIEM Server Installation
- Forwarder Installation
- GeoIP Setup
- Dashboard Installation
SIEM: operate
- Management Console
- Forwarder Operations and Watchdog
- Multi-Interface and Retention
- Scripts Reference
SIEM: fix