Configure Snort IDS Rules on Security Onion to detect and alert on network-based malicious activity.
Given access to a deployed Security Onion instance running Snort as its detection engine.
Snort rules are correctly configured, loaded, and active. Security Onion is generating alerts based on rule matches.
ssh analyst@securityonion.local
cd /opt/so/rules/nids/
ls -al
local.rules. This is where custom rules should be placed.Operator Note: Always document changes to local.rules. Use comments (
#) to record date and purpose.
local.rules in nano or vim.sudo nano local.rules
alert tcp any any -> any 80 (msg:"Suspicious HTTP domain access detected"; content:"badactor.com"; http_host; sid:1000001; rev:1;)
Operator Note:
sid(Snort ID) for local rules should start at 1000000+ to avoid overlap with community rules.
sudo so-rulecheck
local.rules and fix them.sudo so-rule-update
local.rules file and apply the changes.Operator Note: Monitor
/opt/so/logs/snortto verify Snort reload occurred successfully.
badactor.com from internal network).msg:"Suspicious HTTP domain access detected"
content, pcre, and other Snort options to reduce false positives.flow, depth, offset for precision.| Tool | Platform | Installation | Usage |
|---|---|---|---|
| Snort | Security Onion / Linux | Built-in | IDS engine |
| PulledPork (optional) | Linux | Manual install | Automatically update community rules |
| Suricata (if deployed) | Security Onion / Linux | Built-in alt. to Snort | May use similar rule syntax |
local.rules to add custom rules.so-rulecheck.so-rule-update.msg fields for easier triage.1000000+.| Date | Version | Description | Author |
|---|---|---|---|
| 2025-05-02 | 1.0 | Created from scratch with detailed operator-level guidance and examples | Leo |