Snort is a free, open-source network intrusion detection and prevention system created by Martin Roesch in 1998 and now maintained by Cisco. It inspects network packets in real time, compares them against a set of rules, and raises alerts when traffic matches a known attack pattern. Deployed inline, it can also block malicious packets.
Key takeaways
- Snort inspects network traffic in real time and alerts on packets that match its rules.
- In IDS mode it only watches and alerts; in IPS mode it also blocks malicious traffic inline.
- Its detection depends on up-to-date rules, so Talos subscriber or community rulesets must be refreshed regularly.
Your firewall decides which traffic may enter your network. Snort watches what that traffic actually does. It is one of the most widely used intrusion detection tools in the world, it costs nothing to download, and it still powers serious security operations in small businesses and large enterprises alike.
What is Snort?
Snort is a free, open-source network intrusion detection and prevention system. It captures network packets, decodes them, and compares them against rules that describe known malicious activity, raising an alert when a packet matches.
Snort was created by Martin Roesch in 1998. It was later maintained by Sourcefire, the company Roesch founded, and Cisco acquired Sourcefire in 2013. Today Snort is developed by Cisco, with its rules maintained by Cisco Talos, and it is described on Snort.org as the foremost open-source intrusion prevention system in the world.
Snort has three primary uses, according to its own documentation:
- Packet sniffer — like tcpdump, it displays packet headers as traffic passes.
- Packet logger — it records packets to disk for later analysis and debugging.
- Intrusion detection and prevention — its main role, where it detects attacks and can block them.
It runs on Linux, Windows and macOS, and it can be downloaded and configured for personal and business use alike.
How does Snort work?
Snort works in a pipeline: it captures packets, decodes their protocols, checks them against its rule set, and then logs the packet or raises an alert when a rule matches.
The five parts of Snort work together. The packet decoder parses raw packets into a structured form. Preprocessors normalize traffic and detect tricks such as fragmented packets. The detection engine compares the decoded packet against the rule set. The logging and alerting system records matches and sends alerts. And the rule set itself defines what counts as suspicious.
A Snort rule has a header and options. The header says what action to take, which protocol to watch, and which source and destination addresses and ports apply. The options carry the message, the content pattern to match, and a unique signature ID. A simple rule might alert on any TCP traffic to a web server, while a real Talos rule matches the exact byte pattern of a known exploit.
Snort IDS vs IPS: what is the difference?
The difference is action. In IDS mode Snort watches and reports; in IPS mode it also stops the traffic. The same engine does both — the deployment decides which one you get.
| IDS mode | IPS mode | |
|---|---|---|
| Placement | Passive, on a SPAN port or tap | Inline, in the traffic path |
| What it does | Inspects a copy of traffic | Inspects the traffic itself |
| On a match | Logs and alerts only | Logs, alerts and can drop the packet |
| Risk if it fails | You lose visibility | Traffic can stop flowing |
| False positives | Annoying alerts | Can block legitimate users |
| Best first step | Yes, for most small teams | After tuning in IDS mode |
Cisco's own documentation puts it plainly: in IDS mode Snort inspects traffic and reports alerts but takes no action, while in IPS mode actions are taken to prevent attacks. Start in IDS mode, tune out the false positives, and only then switch the rules that matter to blocking actions such as drop.
Rule actions tell the story. alert logs the packet and raises an alert. log records it without alerting. pass ignores it. The prevention actions are drop, which blocks and logs the packet, and sdrop, which blocks it without logging.
What are Snort rules and where do they come from?
Snort rules are the detection logic. Without rules, Snort sees traffic but understands none of it. Keeping rules current is the single most important maintenance task.
Rules are distributed in two sets. The Community Ruleset is developed by the Snort community, checked by Cisco Talos, and freely available to all users. The Snort Subscriber Ruleset is developed, tested and approved by Cisco Talos, and subscribers receive it in real time as new rules are released, according to Snort.org.
Each rule carries a signature ID (SID). Community rules typically use SIDs above 1,000,000, which lets you write your own local rules without colliding with official ones. When you write a local rule, give it a clear message, a narrow pattern, and a unique SID, and test it in IDS mode first.
Here is what a basic rule looks like, using a fictional internal network:
alert tcp any any -> 192.168.1.0/24 80 (msg:"HTTP traffic detected"; sid:1000001;)- The header says: alert on TCP traffic from any source to port 80 on that network.
- The
msgoption is the text that appears in the alert, andsididentifies the rule.
Real detection rules add content matches, flow direction, byte tests and thresholds, so they fire only on the exact pattern of an attack rather than on ordinary traffic.
What is Snort 3 and should you use it?
Snort 3 is the current, actively developed version of Snort. It rebuilds the Snort 2 engine with a modular, multi-threaded design that handles modern network speeds better.
Snort 2.9.x remains widely documented and stable, and many guides still use it, but new deployments should start with Snort 3 unless a specific tool or appliance requires Snort 2. Cisco's newer releases support Snort engine version 3, including the upgrade from version 2 in Cisco IOS XE Catalyst SD-WAN Release 17.12.1a.
The practical differences for you are performance and configuration. Snort 3 uses a new configuration format and a plugin architecture, so old Snort 2 configuration files and some old rules need conversion. Check that your chosen rule set and any front-end tool support Snort 3 before you migrate a working Snort 2 sensor.
How do you deploy Snort?
Deploy Snort in four steps: pick the sensor location, install the engine, load rules, and send alerts somewhere a human will see them.
- Choose the vantage point. For IDS, mirror traffic with a SPAN port or tap at the internet edge, or between network segments you want to watch. For IPS, place the sensor inline so traffic must pass through it.
- Install Snort. On Ubuntu, Snort 2.9.x is available through the package manager; Snort 3 usually needs to be built from source. Install on Linux for the best documentation and community support.
- Configure the network variables. Tell Snort which networks are yours, which ports your servers listen on, and where to write logs. A wrong home-network setting is the most common cause of noisy or silent sensors.
- Load and update rules. Register on Snort.org for rule downloads, enable the community or subscriber ruleset, and schedule automatic updates.
- Send alerts to a central place. Forward alerts to a SIEM, a log server, or a tool such as Snort's own alert output, so they are reviewed instead of sitting in a local log file.
Cisco also ships Snort as a virtual service on its routers. The Snort IPS feature runs the Snort engine as a virtual container on Cisco 4000 Series routers and Cloud Services Router 1000v, with signature packages downloaded from Cisco, so branch offices get intrusion prevention without a separate appliance.
Snort vs Suricata: which should you choose?
Suricata is the main open-source alternative to Snort, and the choice usually comes down to performance needs and rule compatibility rather than detection quality.
| Snort | Suricata | |
|---|---|---|
| License | Open source, Cisco-maintained | Open source, OISF-maintained |
| Detection | Signature rules, protocol analysis | Signature rules, protocol analysis |
| Threading | Multi-threaded in Snort 3 | Multi-threaded by design |
| Rule sets | Talos subscriber and community | Emerging Threats and others |
| Ecosystem | Cisco routers, Talos intelligence | Wide SIEM and tool support |
| Best for | Cisco shops, learning IDS | High-throughput multi-core sensors |
If your network already runs Cisco gear, or you want the largest body of tutorials, Snort is the natural pick. If you need maximum throughput on many-core hardware, test Suricata alongside it. Both tools can read similar rule syntax, and both feed alerts into a SIEM the same way. You can learn the wider context in our guide to what spear phishing is, since many attacks Snort detects start with a phishing email.
How do you tune Snort and handle false positives?
A new Snort sensor is noisy. Tuning is the work of turning thousands of alerts into a handful that matter, and it never really ends.
Start by reviewing the most frequent alerts. A single misconfigured internal scanner or a chatty application can generate most of your volume. Fix the source, suppress that rule for that host, or narrow the rule — do not just turn off whole categories.
Keep a simple log of every change: which rule, why it was changed, and who approved it. When a real incident arrives, that log is what lets you trust the alerts that remain. And keep rules updated — an unpatched rule set is like an antivirus database from last year.
Common mistakes include placing the sensor where it cannot see the traffic you care about, never checking alerts, and switching to IPS mode on day one. Each one turns a useful tool into either a blind spot or a source of outages.
For a wider starting point, see our small business cybersecurity checklist.
The bottom line
Snort gives a small team enterprise-grade network visibility for the cost of a server and some tuning time. Its value comes from its rules and from the habit of reviewing alerts, not from the install itself.
Start with one sensor in IDS mode, load the community rules, and build a daily alert review into your routine. Once the noise is under control, move your proven rules to blocking. To see the wider picture of what your network exposes, run our free DNS lookup tool on your own domain and check what the internet can already see.
Frequently asked questions
What is Snort used for?
Snort is used to watch network traffic for signs of attack. It can act as a packet sniffer, a packet logger, or a full intrusion detection and prevention system, depending on how you run it.
Is Snort free?
Yes. Snort itself is free and open source. The community ruleset is also free. Cisco Talos offers a paid subscriber ruleset that delivers new rules in real time as they are released.
What is the difference between Snort IDS and IPS?
In IDS mode Snort inspects traffic and reports alerts but takes no action to stop an attack. In IPS mode it sits inline in the traffic path and can drop or block packets that match a rule.
What is Snort 3?
Snort 3 is the current actively developed version of Snort. It replaces the Snort 2 engine with a more modular design, better multi-threading and improved performance, and Cisco supports Snort engine version 3 in newer IOS XE releases.
Does Snort replace a firewall?
No. A firewall controls which traffic is allowed in or out based on ports, addresses and policy. Snort inspects the content of allowed traffic for attacks. The two work best together.
Can Snort detect zero-day attacks?
Only partly. Snort is mainly signature-based, so it is strongest against known attacks. Protocol analysis and anomaly-style rules can catch some unusual traffic, but a brand-new attack with no matching rule may pass unnoticed.
Where should Snort be deployed?
For IDS, place a sensor where it can see the traffic you care about, such as a SPAN port or network tap at the network edge or between segments. For IPS, it must sit inline so it can block traffic before it reaches its target.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against Snort.org, the Snort 3 documentation and Cisco Snort IPS documentation.
How we write and fact-check →