Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
$ als gewone gebruiker# als root (of met sudo)
The quick answer
Step by step
- Where to listen — on the server itself (its own traffic) or on a host that gets a mirror/SPAN port or cloud traffic mirroring (whole network). Set
HOME_NETinsuricata.yamlto your internal ranges, and the interface in theaf-packetsection (line 3 does that foreth0; on RHEL also check/etc/sysconfig/suricata). - Rules (line 2) —
suricata-updatedownloads Emerging Threats Open into/var/lib/suricata/rules/suricata.rules. Run it daily (timer) and reload:suricatasc -c reload-rules. - Test the config (line 4) —
-Tloads everything and reports errors without starting. - Trigger a harmless test alert (lines 6–7) — the test page returns text that a rule detects (
GPL ATTACK_RESPONSE id check returned root). - Read alerts —
fast.logis one line per alert;eve.jsonhas full details (flow, HTTP host, TLS SNI, DNS). With jq:
jq -c 'select(.event_type=="alert") | {ts: .timestamp, src: .src_ip, dst: .dest_ip, sig: .alert.signature}' /var/log/suricata/eve.json | tail- Tune — too many alerts nobody reads are useless. Disable noisy rules in
/etc/suricata/disable.conf(by SID), thensuricata-updateagain. - Ship the alerts — send
eve.jsonwith Fluent Bit or Filebeat to your SIEM/Loki/Wazuh, and alert on high-severity signatures. - IPS mode (blocking) is possible with NFQUEUE, but start with IDS until the rules are tuned — a false positive in IPS mode blocks real users.
Check that it worked
suricata -T ends with Configuration provided was successfully loaded; systemctl status suricata is active; the test request creates an alert line in fast.log and an "event_type":"alert" record in eve.json; suricatasc -c uptime answers.
Common problems
| Problem | Cause | Fix |
|---|---|---|
| No alerts at all | Wrong interface, or no rules loaded. | Check af-packet interface; suricata-update; look at suricata.log for "rules loaded". |
| Test alert missing | Traffic is HTTPS, or offloading hides packets. | Use the plain-HTTP test URL; disable NIC offloading (ethtool -K eth0 gro off lro off). |
| Thousands of alerts per hour | Untuned rule set, wrong HOME_NET. | Set HOME_NET; disable noisy SIDs. |
| High CPU / dropped packets | Too much traffic for one core. | More worker threads; af-packet with cluster settings; bigger host. |
eve.json fills the disk | No rotation. | logrotate with copytruncate or Suricata's own rotation. |
| HTTPS attacks invisible | Traffic encrypted. | Watch TLS metadata (SNI, JA3); inspect at the reverse proxy / WAF. |
Go further
- Command pages: jq.
- Next how-tos: Collect security events with Wazuh, Capture network traffic with tcpdump, Ship logs with Fluent Bit, Find open ports on your servers with Nmap.
- Learn it: IBM Cybersecurity Analyst — Network security, IBM Cybersecurity Analyst — Incident response. Full guide: Suricata.
1What is the difference between an IDS and an IPS?
An IDS only detects and alerts; an IPS sits in the traffic path and can block it.
2Why start Suricata in IDS mode first?
Untuned rules create false positives; in IPS mode they would block real users.