cookbook 'snort', '~> 6.0.0'
snort
(23) Versions
6.0.0
-
Follow14
Installs Snort IDS packages
cookbook 'snort', '~> 6.0.0', :supermarket
knife supermarket install snort
knife supermarket download snort
Snort cookbook
Install and manage Snort 3 with explicit Chef custom
resources. This is a breaking upgrade from the Snort 2 cookbook. Read
[migration.md](migration.md) before upgrading an existing sensor.
Requirements
- Chef Infra Client 18 or newer and systemd.
- Debian 12+, Ubuntu 22.04+, RHEL-compatible 8+, Amazon Linux 2023 and current Fedora.
- A C++17 toolchain, development packages and sufficient memory to compile Snort.
- Network access to the distribution repositories, GitHub and snort.org.
The default builds pinned Snort 3.13.2.0, DAQ 3.0.29, libdnet 1.18.2 and zlib 1.4
into /opt/snort/3.13.2.0. Private libraries do not replace system libraries.
The optional LibML model runtime and Hyperscan are not installed by default.
Usage
snort_install 'sensor' snort_rules 'community' do notifies :restart, 'snort_service[sensor]', :delayed end snort_config 'sensor' do home_net '10.0.0.0/8' rules ['/etc/snort/rules/community/snort3-community.rules'] notifies :restart, 'snort_service[sensor]', :delayed end snort_service 'sensor' do interface 'eth0' # Choose the sensor's capture interface explicitly. action [:create, :enable, :start] end
Installation alone does not start capture. The generated service runs as the
snort account with packet-capture capabilities. The configuration uses the
vendor's Snort 3 inspection policy, with explicit network variables and rule files.
Resources
- [snort_install](documentation/snort_install.md): install or remove the pinned source build.
- [snort_compile](documentation/snort_compile.md): configure source builds directly.
- [snort_config](documentation/snort_config.md): create or delete a Lua configuration.
- [snort_rules](documentation/snort_rules.md): download and remove named rule sets.
- [snort_service](documentation/snort_service.md): manage the systemd unit and capture process.
To remove a sensor, stop and delete its service, delete the managed rule sets and
configuration, then remove the installation. Shared build packages, package
repositories and the snort account are retained.
The public community rules do not require an Oinkcode. Registered and subscriber
rules require your own credentials and entitlement. This cookbook does not obtain
subscriptions or redistribute private rules. Use rule archives for Snort 3, not
the Snort 2 community archive or compiled Snort 2 rules.
Testing
The default Kitchen suite builds Snort, validates its configuration and community
rules, starts the service on isolated loopback and verifies that a synthetic PCAP
triggers a local rule. Two converges check idempotency. The removal suite verifies
that unchanged owned installation, configuration, rules and service artifacts are removed while operator files and logs survive.
chef install Policyfile.rb chef exec rspec KITCHEN_LOCAL_YAML=kitchen.dokken.yml chef exec kitchen test default-ubuntu-2404 --destroy=always
Dependent cookbooks
| yum-epel >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
snort Cookbook CHANGELOG
This file is used to list changes made in each version of the snort cookbook.
- Cookstyle auto-corrections applied on 2025-04-14
6.0.0 (2026-11-12)
⚠ BREAKING CHANGES
- migrate cookbook to Snort 3 resources (#107)
Features
Bug Fixes
5.0.13 (2025-10-16)
Bug Fixes
5.0.5 - 2023-06-08
Standardise files with files in sous-chefs/repo-management
5.0.3 - 2022-02-08
- Remove delivery folder
5.0.2 - 2021-08-30
- Standardise files with files in sous-chefs/repo-management
5.0.1 (2021-06-01)
- Standardise files with files in sous-chefs/repo-management
5.0.0 (2020-05-05)
- Migrate to Github Actions
- Replace zip extraction with archive_file Breaking change
v4.0.2 (2019-06-25)
- Added CircleCI 2.0 support
v4.0.1 (2018-12-14)
- Updated checksums for the snort package on CentOS and Fedora
v4.0.0 (2018-08-28)
- Drop Chef-12 support
v3.0.1 (2018-08-28)
- Fix service start bug on RHEL platforms
- Move resource helpers to a shared helpes file
v3.0.0 (2017-05-03)
- New custom resources for
snort_install,snort_compile,snort_rules,snort_config - Updated
snort_service
v2.1.0
- Update the versions to the latest snort on RHEL/Fedora
- Require at least compat_resource 12.9 to prevent random issues
- Remove Chef 11 compatibility from the metadata file
- Use kitchen-dokken in Travis CI
v2.0.0
- Added new snort_service custom resource and a_service.rb recipe. The recipe is called by the default.rb recipe. The custom resource can be used to write wrapper cookbooks and supports the standard service actions (enable, start, restart, reload). The custom resource used the new Chef 12.5 customer resource format and the compat_resource cookbook for compatibility with 12.0+
v1.1.0
- Updated to the latest daq and snort packages for RHEL
- Added Chefspecs for RHEL/Debian platforms
- Moved all install logic into _install.rb recipe which is called by the default recipe. This changes nothing, but prepares things for adding more functionality at a later date.
- Updated platforms in the Kitchen CI config
- Added source_url and issues_url metadata for Supermarket
- Updated Travis config to test via ChefDK and to use kitchen-docker for integration tests
- Removed yum cookbook from the Berksfile since it wasn't needed
- Removed the Contributing doc since it was from when this cookbook was managed by Chef Software Inc.
- Added standard Chef development gems to the Gemfile
- Removed references to database output from the Readme
- Added a Rakefile for simplified testing
v1.0.0
- Updated to the latest Snort packages on RHEL / Fedora. For RHEL the minimum supported release is now RHEL 7 due to Snort requirements
- The default package action is now install and not upgrade to prevent service restarts on Chef runs
- Switched to platform_family to support all Debian / RHEL derivitives
- Switch file/dir mode declarations to strings to preserve the leading 0s
- Updated the Contributing doc to reflect the new process
- Added a chef ignore file to prevent unecessary files on the Chef server
- Added a rubocop file and resolved all Rubocop warnings
- Added a Test Kitchen config for testing supported platforms
- Added a Gemfile with development dependencies
- Added a Berksfile for development dependencies
v0.10.0
- [COOK-1512] - Update SNORT cookbook with upstream changes for RHEL platforms
Collaborator Number Metric
6.0.0 passed this metric
Contributing File Metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Cookstyle Metric
6.0.0 passed this metric
No Binaries Metric
6.0.0 passed this metric
Testing File Metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
6.0.0 passed this metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Cookstyle Metric
6.0.0 passed this metric
No Binaries Metric
6.0.0 passed this metric
Testing File Metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
6.0.0 passed this metric
6.0.0 passed this metric
Testing File Metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
6.0.0 failed this metric
6.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number