Skip to content

Suricata

65 commands

A high-performance, multi-threaded IDS/IPS and network security monitoring engine with EVE JSON logging.

  • IDS
  • IPS
  • NSM

Install Suricata

sudo apt install suricata

General Information4

suricata -V

Displays the currently installed Suricata version

suricata --build-info

Prints detailed build information including enabled features and libraries

suricata --list-app-layer-protos

Lists all supported application layer protocols available for detection

suricata --list-keywords

Lists all supported rule keywords that can be used in signatures

Configuration Testing3

suricata -T

Tests the configuration file for errors without starting the engine

Link
suricata -T -v

Tests the configuration file and provides verbose output regarding parsing

Link
suricata --dump-config

Dumps the effective configuration to the console for verification

Basic Packet Capture3

suricata -i <interface>

Starts Suricata in IDS mode monitoring live traffic on a specific interface

Link
suricata --af-packet

Uses AF_PACKET mode for high-performance packet capture on Linux

Link
suricata --pcap

Uses standard libpcap mode for packet capture which is more portable but slower

Link

Offline Analysis3

suricata -r <file>

Processes a single offline PCAP file for intrusion detection analysis

Link
suricata -r <directory>

Processes all PCAP files found within a specific directory sequentially

Link
suricata -r <file> -k none

Replays a PCAP while disabling checksum validation to force processing of offloaded packets

Link

Configuration Management1

suricata -c <config>

Specifies a custom configuration file path instead of the default location

Link

Logging & Output1

suricata -l <directory>

Directs all log output including EVE JSON to a custom directory

Link

Rule Management2

suricata -s <file>

Loads an additional rule file on top of those defined in the configuration

Link
suricata -S <file>

Loads ONLY the specified rule file ignoring rules in the configuration

Link

Filtering & BPF1

suricata <filter>

Applies a BPF filter to limit the traffic Suricata inspects

Link

Performance Tuning2

suricata --runmode <mode>

Sets the processing runmode to 'workers' for better multicore scaling

Link
suricata --cpu-affinity

Enables CPU pinning to bind threads to specific cores for performance stability

Link

Daemon Mode2

suricata -D

Runs Suricata in the background as a daemon process

Link
suricata --pidfile <file>

Writes the process ID to a specific file when running in daemon mode

Link

Security & Permissions1

suricata -u <user>

Drops privileges to run as a specific user after initialization

Link

IPS Mode2

suricata -q <queue>

Starts Suricata in inline IPS mode using NFQUEUE id 0

Link
suricata -q <queue> --runmode autofp

Runs IPS mode with autofp runmode which is often default for NFQUEUE

Link

Debug & Analysis1

suricata --engine-analysis

Prints a report on rule grouping and engine configuration for tuning

Link

Socket Control1

suricata --unix-socket

Enables the Unix control socket for runtime interaction

Link

Socket Client8

suricatasc

Connects to the default Suricata control socket for interactive commands

Link
suricatasc -c version

Queries the running Suricata instance for its version via socket

Link
suricatasc -c uptime

Queries the running instance for its current uptime

Link
suricatasc -c reload-rules

Triggers a live reload of the ruleset without restarting the daemon

Link
suricatasc -c shutdown

Sends a command to gracefully shut down the Suricata instance

Link
suricatasc -c capture-mode

Displays the current capture mode such as AF_PACKET or PCAP

Link
suricatasc -c iface-stat

Retrieves statistics for a specific interface via the control socket

Link
suricatasc -c dump-counters

Dumps all internal performance counters for monitoring health

Link

SOC Workflow4

suricata -r <pcap> -l <dir>

Standard SOC workflow to analyze a suspicious PCAP and isolate logs

Link
grep

Filters the EVE JSON output to show only alert events

Link
jq

Uses jq to parse EVE JSON and extract specific signature names from alerts

Link
suricata --set <key>=<value>

Overrides a configuration value from the command line for ad-hoc testing

Link

Blue Team Validation2

suricata -S <rule> -r <pcap>

Validates a specific new signature against known exploit traffic

Link
suricata --simulate-ips

Simulates IPS blocking behavior on a PCAP file to see what would drop

Link

Purple Team2

suricata -k none

Analyzes generated traffic with invalid checksums typical of attack tools

Link
suricata -v

Runs analysis with verbose logging to debug why a signature might not fire

Link

Advanced Networking2

suricata --netmap

Uses NETMAP mode for high-speed packet capture on supported systems

Link
suricata --pfring

Uses PF_RING for high-speed capture if the library is linked

Link

Automated Testing2

suricata -U

Runs the built-in unit tests to verify internal engine integrity

Link
suricata -u <test_regex>

Runs only unit tests matching the specified regex pattern

Link

Troubleshooting2

suricata --init-errors-fatal

Forces Suricata to exit immediately if any rule fails to load at startup

Link
suricata --reject-dev

Specifies the interface used to send TCP resets or ICMP unreachables

Link

Advanced Configuration2

suricata --dag

Enables hardware capture support for Endace DAG cards

Link
suricata --napatech

Enables support for Napatech capture streams

Link

Log Management1

suricatasc -c reopen-log-files

Instructs Suricata to close and reopen log files for log rotation

Link

Incident Response2

suricata -r <pcap> --set outputs.1.eve-log.types.0=flow

Rapidly generates only flow records from a PCAP to trace connections

Link
suricata -r <pcap> --set outputs.1.eve-log.types.0=fileinfo

Analyzes a PCAP specifically to extract file metadata and hashes

Link

Signature Dev1

suricata --conf-test

Strictly validates the configuration and rules ensuring no warnings exist

Link

Performance Profiling2

suricatasc -c memcap-list

Lists the memory cap settings for various internal buffers

Link
suricatasc -c memcap-set

Dynamically adjusts the memory cap for the flow engine at runtime

Link

Detection Tuning2

suricatasc -c dataset-add

Adds data to a running dataset for dynamic sticky buffer matching

Link
suricatasc -c dataset-remove

Removes data from a dynamic dataset during runtime

Link

Cleanup1

rm

Manually cleans up socket directories if a clean shutdown fails

Link

Advanced Capture1

suricata --dpdk

Enables DPDK support for ultra high-speed packet processing

Link

Rule Development1

suricata -T -S <file>

Tests a specific rule file for syntax errors without loading the main config

Link

Metadata Extraction1

suricata -r <pcap> --set app-layer.protocols.tls.enabled=yes

Forces TLS metadata extraction even if disabled in default config

Link

Live Debugging1

suricatasc -c version-json

Returns the version and build info in JSON format for automation

Link

Process Control1

kill -USR2

Sends a USR2 signal to the process to trigger a rule reload manually

Link