%YAML 1.1 --- # LEAF-PROTO Suricata IDS config (IDS VM). Self-contained drop-in. # Run: suricata -c /etc/suricata/suricata-leaf.yaml -i MIRROR_IFACE # (Debian: apt install suricata suricata-update; mirror NIC must be promisc/untagged-capable) vars: main: /var/lib/suricata-leaf address-groups: HOME_NET: "[192.168.100.0/24,10.0.249.0/31,172.19.32.0/24]" EXTERNAL_NET: "!$HOME_NET" default-rule-path: /etc/suricata-leaf/rules rule-files: - leaf-local.rules # --- log output location -------------------------------------------------- # eve.json is written below as an absolute path. Provision # /var/log/suricata-leaf on a 6-8G tmpfs (RAM disk) to keep eve writes off # the physical disk. leaf-eve-rotate.timer renames the file hourly or at # 64 MiB, signals HUP to reopen it, and keeps six backups. The controller # drains the old inode before opening the new one. logging: default-log-level: info outputs: - console: enabled: no - file: enabled: yes level: info filename: suricata.log # --- capture: mirror NIC ------------------------------------------------- af-packet: - interface: eth1 # mirror NIC on LEAF-PROTO VM (10.0.249.1/31) cluster-id: 98 cluster-type: cluster_flow defrag: yes use-mmap: yes tpacket-v3: no bpf-filter: "not ip host 255.255.255.255 and not udp port 5353" # --- output split: alerts over the controller socket, stats on file ------ # The controller binds /run/suricata/alerts.sock (AF_UNIX listener) and # suricata connects as the CLIENT; ordering is contract-critical: the # leaf-controller unit binds at startup, the sensor unit Wants+After it. # The controller reports readiness after binding the socket. # Stats stay in eve.json on tmpfs. Alerts use the socket and can be lost # during disconnection or if the sender cannot write without blocking. outputs: - eve-log: enabled: yes filetype: unix_stream filename: /run/suricata/alerts.sock # the socket path, not a log file types: - alert: metadata: yes payload: no # keep EVE small; set packet-based extras later if needed - eve-log: enabled: yes filetype: regular filename: /var/log/suricata-leaf/eve.json types: - stats: totals: yes threads: no # --- engine: fine for 1-2 Gbps mirror ------------------------------------ threading: pfring: enabled: no pcap: buffer-size: 16777216 stream: memcap: 128mb flow: memcap: 64mb stats: enabled: yes interval: 30 host-mode: auto # reference: ET open ruleset optional via `suricata-update --sources` but do NOT # tag whole ET for leaf_action; only our local rules carry metadata: leaf_action.