Skip to main content
Modules are the building blocks of Snort 3. Every configurable component — from stream reassembly to alert output — is a module. Modules are configured as Lua tables with the same name as the module. To inspect any module from the command line:
# Show parameters, type, and defaults for a module
snort --help-module <name>

# Show all configuration parameters
snort --help-config

# Filter to a specific module
snort --help-config stream_tcp
Parameter format in help output:
type module.name = default: help { range }
Using module = { } enables a module with all internal defaults. Run snort --help-module <name> to see those defaults before overriding them.

Core Modules

The snort module exposes the primary command-line flags as configuration parameters. Settings here have the second-highest precedence (command-line options override them).
snort --help-module snort
Key parameters mirror command-line flags such as -c, -l, -n, and BPF filtering. This module also provides the interactive shell commands when built with --enable-shell.
Controls the intrusion prevention policy: which rules are loaded, built-in rule enablement, and rule variables.
snort --help-module ips
ParameterTypeDefaultDescription
enable_builtin_rulesboolfalseEnable built-in decoder and inspector alert rules.
includestringPath to a rules file to load.
rulesstringInline rule text.
statesstringPath to a rule states file (parsed after rules).
variablestableNamed variable sets for nets, ports, and paths.
ips =
{
    enable_builtin_rules = true,
    include = 'rules/local.rules',
    variables = default_variables
}
# Enable built-in rules from the command line
snort -c snort.lua --lua 'ips = { enable_builtin_rules = true }'
IPS states are similar to rules but parsed after rules, allowing custom policy overrides.
Configures network-layer behaviour such as TTL thresholds and checksum handling.
snort --help-module network
ParameterTypeDescription
min_ttlintDrop packets with TTL below this value.
new_ttlintReplacement TTL when normalising packets (inline mode).
checksum_dropmultiDrop packets with bad checksums for listed protocols.
network =
{
    min_ttl = 1,
    new_ttl = 5
}
Configures how Snort sends active responses (TCP resets, ICMP unreachables) when rules use reject or react.
snort --help-module active
ParameterTypeDefaultDescription
attemptsint0Number of TCP packets sent per response with varying sequence numbers. Range: 0–20.
devicestringInterface for link-layer responses, or 'ip' for network-layer responses.
dst_macstringDestination MAC for link-layer responses. Format: '01:23:45:67:89:ab'.
max_responsesint0Maximum number of response packets. 0 means unlimited.
min_intervalint255Minimum seconds between responses. Range: 1+.
active =
{
    attempts = 2,
    device = 'eth0',
    max_responses = 1,
    min_interval = 5
}
active.attempts and active.device cannot be changed during a live reload — a restart is required.
Controls privilege dropping, daemonisation, and chroot.
snort --help-module process
ParameterTypeDescription
chrootstringChange root to this directory after startup.
daemonboolRun as a background daemon.
set_gidstringDrop to this group after startup.
set_uidstringDrop to this user after startup.
dirty_pigboolSkip memory cleanup on exit (faster shutdown).
process =
{
    daemon = true,
    set_uid = 'snort',
    set_gid = 'snort'
}
process.chroot, process.daemon, process.set_gid, and process.set_uid require a restart to change; live reload is not supported for these parameters.

Stream Modules

Stream modules provide stateful flow tracking, IP defragmentation, and protocol-level reassembly.
The top-level stream module enables flow state tracking. It must be configured for any stream reassembly to occur.
snort --help-module stream
stream = { }
Reassembles fragmented IP packets before inspection.
snort --help-module stream_ip
stream_ip = { }
Provides full TCP stream reassembly and session tracking.
snort --help-module stream_tcp
ParameterTypeDefaultDescription
session_timeoutint30Seconds of inactivity before a TCP session expires.
max_windowint0Maximum allowed TCP window size (0 = unlimited).
overlap_limitint0Maximum overlapping TCP segments before pruning (0 = unlimited).
small_segmentstableAlert on excessive small segments.
stream_tcp = { session_timeout = 60 }
Or equivalently:
stream_tcp = { }
stream_tcp.session_timeout = 60
Adding or removing stream_* inspectors after stream is already configured requires a full restart, not a reload.
Tracks UDP sessions for stateful inspection.
snort --help-module stream_udp
ParameterTypeDefaultDescription
session_timeoutint30Seconds before a UDP session expires.
stream_udp = { }
Tracks ICMP flows for correlation and stateful detection.
snort --help-module stream_icmp
stream_icmp = { }
Tracks file content streams for file identification and policy enforcement.
snort --help-module stream_file
stream_file = { }

Detection Modules

Controls the core rule evaluation engine.
snort --help-module detection
ParameterTypeDescription
service_extensiontableMaps service names to additional services for rule group membership. Default extends http with http2/http3 and netbios-ssn with dcerpc.
global_rule_stateboolApply rule state globally across all policies.
-- Default service_extension is built in; override if needed
detection = { }
Selects and tunes the multi-pattern search engine (MPSE) used for fast pattern matching.
snort --help-module search_engine
ParameterTypeDefaultDescription
search_methodenumac_bnfaMPSE algorithm. See options below.
max_pattern_lenint0Truncate patterns longer than this (0 = no limit).
max_queue_eventsintMaximum events queued per packet.
Search methods:
MethodDescription
ac_bnfaAho-Corasick with BNFA compression. Balances speed and memory (default).
ac_fullAho-Corasick with full DFA. Faster but uses significantly more memory.
hyperscanIntel Hyperscan. Best performance and reasonable memory; requires Hyperscan library.
search_engine = { search_method = 'ac_full' }
Controls how detection events are queued and deduplicated before logging.
snort --help-module event_queue
ParameterTypeDefaultDescription
max_eventsint8Maximum events to queue per packet.
log_eventsint3Number of events to log from the queue.
orderenumcontent_lengthQueue ordering: content_length or priority.
event_queue =
{
    max_events = 16,
    log_events = 5,
    order = 'priority'
}

Output / Logging Modules

Output modules are activated via -A <mode> on the command line or by configuring the corresponding Lua table.
Module-A aliasDescription
alert_cmgcmgCompact alert with hex/text payload dump. Equivalent to fast -d -e.
alert_fastfastSingle-line summary per alert.
alert_fullfullVerbose alert with all header fields.
alert_csvcsvComma-separated output. Fields and separator are configurable.
alert_jsonjsonJSON-formatted alert records.
alert_unified2unified2 / u2Binary unified2 format for post-processors.
alert_syslogSend alerts to syslog.
-- Customise CSV output fields and separator
alert_csv =
{
    fields = 'timestamp pkt_num proto src_ap dst_ap gid sid rev msg',
    separator = ','
}
# Output timestamp, pkt_num, proto, pkt_gen, dgm_len, dir, src/dst, rule, action
snort -c snort.lua -A csv
Module-L aliasDescription
log_pcappcapWrite captured packets to a pcap file.
log_hexthextDump TCP stream payload in hex/text format.
# Write 10 packets to log.pcap.*
snort -i eth0 -L pcap -n 10

# Dump stream payload as hext
snort -c snort.lua -L hext

Performance Modules

Captures and periodically outputs a configurable set of peg counts during runtime. Useful for feeding to external monitoring tools without stopping Snort.
snort --help-module perf_monitor
-- Enable with defaults
perf_monitor = { }
Tracks CPU time and memory usage per module and per rule. Output appears in the Summary Statistics section at shutdown.
snort --help-module profiler
ParameterTypeDescription
modulestableModule-level profiling options (show, count, sort).
rulestableRule-level profiling options (show, count, sort).
profiler =
{
    modules = { show = true, count = 10, sort = 'avg_check' },
    rules   = { show = true, count = 10, sort = 'avg_check' }
}
Monitors and optionally enforces time limits on packet processing and rule evaluation.
snort --help-module latency
ParameterTypeDescription
packettablePer-packet latency budget and action on timeout.
ruletablePer-rule evaluation latency budget and action on timeout.
latency =
{
    packet = { max_time = 500, action = 'log' },
    rule   = { max_time = 500, action = 'log' }
}

Filter Modules

Suppresses specific alerts globally or for particular hosts, without removing the rule.
snort --help-module suppress
FieldTypeDescription
gidintGenerator ID of the rule to suppress.
sidintSignature ID of the rule to suppress.
trackenumby_src or by_dst — limit suppression to a specific IP.
ipstringIP address or CIDR to match when track is set.
suppress =
{
    -- Suppress this SID globally
    { gid = 1, sid = 1 },

    -- Suppress everything for a specific destination host
    { track = 'by_dst', ip = '1.2.3.4' },

    -- Suppress a specific SID for a specific source
    { gid = 1, sid = 2, track = 'by_src', ip = '10.0.0.5' },
}
# Reload with a new suppress entry (no restart needed)
echo 'suppress = { { gid = 1, sid = 2215 } }' >> snort.lua
kill -hup <pid>
Reduces alert volume by limiting how many times a rule fires for a given source or destination within a time window.
snort --help-module event_filter
FieldTypeDescription
gidintGenerator ID.
sidintSignature ID.
typeenumlimit (log first N), threshold (log every Nth), or both.
trackenumby_src or by_dst.
countintThreshold count.
secondsintTime window in seconds.
event_filter =
{
    { gid = 1, sid = 1, type = 'limit',  track = 'by_src', count = 2,  seconds = 10 },
    { gid = 1, sid = 2, type = 'both',   track = 'by_dst', count = 5,  seconds = 60 },
}
Changes the action of a rule when a traffic rate threshold is exceeded.
snort --help-module rate_filter
FieldTypeDescription
gidintGenerator ID.
sidintSignature ID.
trackenumby_src or by_dst.
countintNumber of events in the window.
secondsintTime window in seconds.
new_actionenumAction to apply when rate is exceeded (e.g., alert, drop).
timeoutintSeconds the new action remains in effect.
apply_tostringOptional IP address list to restrict the filter.
rate_filter =
{
    { gid = 135, sid = 1, track = 'by_src', count = 5, seconds = 1,
      new_action = 'alert', timeout = 4 },
}

Utility Modules

Automatically identifies services by inspecting traffic patterns, eliminating the need to bind inspectors to fixed port numbers.
snort --help-module wizard
-- Use the built-in default wizard configuration
wizard = default_wizard
Configure the wizard and default port bindings will be created automatically based on which inspectors you have enabled. You do not need to explicitly bind ports in most cases.
Maps network traffic characteristics (protocol, port, service, zone) to specific inspection policies.
snort --help-module binder
Each entry has a when clause (match conditions) and a use clause (what to apply):
binder =
{
    { when = { proto = 'tcp', ports = '80 443', role = 'server' },
      use  = { type = 'http_inspect' } },

    { when = { service = 'smtp' },
      use  = { type = 'smtp' } },

    -- Fallback: use wizard for everything else
    { use = { type = 'wizard' } }
}
Identifies the application protocol in use on a flow, independent of port number. Required to use AppID names in rules.
snort --help-module appid
ParameterTypeDescription
app_detector_dirstringPath to the AppID detector library directory.
appid =
{
    app_detector_dir = '/usr/local/lib/snort/appid'
}
Identifies file types carried in network traffic using magic byte signatures.
snort --help-module file_inspect
ParameterTypeDescription
rules_filestringPath to the file magic rules file (e.g., file_magic.rules).
-- The file magic rules are in file_magic.rules in the Snort install
file_inspect = { rules_file = 'file_magic.rules' }