module = { } enables a module with all internal defaults. Run snort --help-module <name> to see those defaults before overriding them.Core Modules
snort — Main module
snort — Main module
snort module exposes the primary command-line flags as configuration parameters. Settings here have the second-highest precedence (command-line options override them).-c, -l, -n, and BPF filtering. This module also provides the interactive shell commands when built with --enable-shell.ips — IPS policy
ips — IPS policy
| Parameter | Type | Default | Description |
|---|---|---|---|
enable_builtin_rules | bool | false | Enable built-in decoder and inspector alert rules. |
include | string | — | Path to a rules file to load. |
rules | string | — | Inline rule text. |
states | string | — | Path to a rule states file (parsed after rules). |
variables | table | — | Named variable sets for nets, ports, and paths. |
network — Network layer settings
network — Network layer settings
| Parameter | Type | Description |
|---|---|---|
min_ttl | int | Drop packets with TTL below this value. |
new_ttl | int | Replacement TTL when normalising packets (inline mode). |
checksum_drop | multi | Drop packets with bad checksums for listed protocols. |
active — Response settings
active — Response settings
reject or react.| Parameter | Type | Default | Description |
|---|---|---|---|
attempts | int | 0 | Number of TCP packets sent per response with varying sequence numbers. Range: 0–20. |
device | string | — | Interface for link-layer responses, or 'ip' for network-layer responses. |
dst_mac | string | — | Destination MAC for link-layer responses. Format: '01:23:45:67:89:ab'. |
max_responses | int | 0 | Maximum number of response packets. 0 means unlimited. |
min_interval | int | 255 | Minimum seconds between responses. Range: 1+. |
process — Process settings
process — Process settings
| Parameter | Type | Description |
|---|---|---|
chroot | string | Change root to this directory after startup. |
daemon | bool | Run as a background daemon. |
set_gid | string | Drop to this group after startup. |
set_uid | string | Drop to this user after startup. |
dirty_pig | bool | Skip memory cleanup on exit (faster shutdown). |
Stream Modules
Stream modules provide stateful flow tracking, IP defragmentation, and protocol-level reassembly.stream — Flow tracking
stream — Flow tracking
stream_ip — IP defragmentation
stream_ip — IP defragmentation
stream_tcp — TCP reassembly
stream_tcp — TCP reassembly
| Parameter | Type | Default | Description |
|---|---|---|---|
session_timeout | int | 30 | Seconds of inactivity before a TCP session expires. |
max_window | int | 0 | Maximum allowed TCP window size (0 = unlimited). |
overlap_limit | int | 0 | Maximum overlapping TCP segments before pruning (0 = unlimited). |
small_segments | table | — | Alert on excessive small segments. |
stream_udp — UDP session tracking
stream_udp — UDP session tracking
| Parameter | Type | Default | Description |
|---|---|---|---|
session_timeout | int | 30 | Seconds before a UDP session expires. |
stream_icmp — ICMP tracking
stream_icmp — ICMP tracking
stream_file — File stream tracking
stream_file — File stream tracking
Detection Modules
detection — Detection engine
detection — Detection engine
| Parameter | Type | Description |
|---|---|---|
service_extension | table | Maps service names to additional services for rule group membership. Default extends http with http2/http3 and netbios-ssn with dcerpc. |
global_rule_state | bool | Apply rule state globally across all policies. |
search_engine — Pattern matching
search_engine — Pattern matching
| Parameter | Type | Default | Description |
|---|---|---|---|
search_method | enum | ac_bnfa | MPSE algorithm. See options below. |
max_pattern_len | int | 0 | Truncate patterns longer than this (0 = no limit). |
max_queue_events | int | — | Maximum events queued per packet. |
| Method | Description |
|---|---|
ac_bnfa | Aho-Corasick with BNFA compression. Balances speed and memory (default). |
ac_full | Aho-Corasick with full DFA. Faster but uses significantly more memory. |
hyperscan | Intel Hyperscan. Best performance and reasonable memory; requires Hyperscan library. |
event_queue — Event handling
event_queue — Event handling
| Parameter | Type | Default | Description |
|---|---|---|---|
max_events | int | 8 | Maximum events to queue per packet. |
log_events | int | 3 | Number of events to log from the queue. |
order | enum | content_length | Queue ordering: content_length or priority. |
Output / Logging Modules
Output modules are activated via-A <mode> on the command line or by configuring the corresponding Lua table.
Alert loggers
Alert loggers
| Module | -A alias | Description |
|---|---|---|
alert_cmg | cmg | Compact alert with hex/text payload dump. Equivalent to fast -d -e. |
alert_fast | fast | Single-line summary per alert. |
alert_full | full | Verbose alert with all header fields. |
alert_csv | csv | Comma-separated output. Fields and separator are configurable. |
alert_json | json | JSON-formatted alert records. |
alert_unified2 | unified2 / u2 | Binary unified2 format for post-processors. |
alert_syslog | — | Send alerts to syslog. |
Packet loggers
Packet loggers
| Module | -L alias | Description |
|---|---|---|
log_pcap | pcap | Write captured packets to a pcap file. |
log_hext | hext | Dump TCP stream payload in hex/text format. |
Performance Modules
perf_monitor — Runtime metrics
perf_monitor — Runtime metrics
profiler — Time and space profiling
profiler — Time and space profiling
| Parameter | Type | Description |
|---|---|---|
modules | table | Module-level profiling options (show, count, sort). |
rules | table | Rule-level profiling options (show, count, sort). |
latency — Packet and rule latency
latency — Packet and rule latency
| Parameter | Type | Description |
|---|---|---|
packet | table | Per-packet latency budget and action on timeout. |
rule | table | Per-rule evaluation latency budget and action on timeout. |
Filter Modules
suppress — Suppress alerts
suppress — Suppress alerts
| Field | Type | Description |
|---|---|---|
gid | int | Generator ID of the rule to suppress. |
sid | int | Signature ID of the rule to suppress. |
track | enum | by_src or by_dst — limit suppression to a specific IP. |
ip | string | IP address or CIDR to match when track is set. |
event_filter — Alert thresholds
event_filter — Alert thresholds
| Field | Type | Description |
|---|---|---|
gid | int | Generator ID. |
sid | int | Signature ID. |
type | enum | limit (log first N), threshold (log every Nth), or both. |
track | enum | by_src or by_dst. |
count | int | Threshold count. |
seconds | int | Time window in seconds. |
rate_filter — Rate-based filtering
rate_filter — Rate-based filtering
| Field | Type | Description |
|---|---|---|
gid | int | Generator ID. |
sid | int | Signature ID. |
track | enum | by_src or by_dst. |
count | int | Number of events in the window. |
seconds | int | Time window in seconds. |
new_action | enum | Action to apply when rate is exceeded (e.g., alert, drop). |
timeout | int | Seconds the new action remains in effect. |
apply_to | string | Optional IP address list to restrict the filter. |
Utility Modules
wizard — Service autodetection
wizard — Service autodetection
binder — Traffic-to-policy binding
binder — Traffic-to-policy binding
when clause (match conditions) and a use clause (what to apply):appid — Application identification
appid — Application identification
| Parameter | Type | Description |
|---|---|---|
app_detector_dir | string | Path to the AppID detector library directory. |
file_inspect — File identification
file_inspect — File identification
| Parameter | Type | Description |
|---|---|---|
rules_file | string | Path to the file magic rules file (e.g., file_magic.rules). |

