Skip to content

Instantly share code, notes, and snippets.

@da667
Last active May 7, 2024 20:51
Show Gist options
  • Select an option

  • Save da667/28ed48c59f163aad31623f319851c07c to your computer and use it in GitHub Desktop.

Select an option

Save da667/28ed48c59f163aad31623f319851c07c to your computer and use it in GitHub Desktop.
snort3 service file
[Unit]
Description=Snort Daemon
After=syslog.target network.target
[Service]
Type=simple
ProtectHome=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
ExecStartPre=/usr/sbin/ip link set up promisc on arp off multicast off dev snort_iface1
ExecStartPre=/usr/sbin/ethtool -K snort_iface1 rx off tx off gro off lro off
ExecStart=/usr/local/bin/snort --plugin-path=/usr/local/lib/snort --plugin-path /usr/local/etc/so_rules/ -c /usr/local/etc/snort/snort.lua -D -u snort -g snort -l /var/log/snort -m 0x1b --create-pidfile -s 65535 -k none -i snort_iface1
Restart=on-failure
RestartSec=120s
[Install]
WantedBy=multi-user.target
@da667
Copy link
Author

da667 commented May 7, 2024

Note: For users having problems with shared object rules not loading and want to just forego them entirely, remove the line --plugin-path /usr/local/etc/so_rules/.

You'll also need to re-run pulledpork, commenting out or removing the distro and sorule_path directives to avoid downloading shared-object rules. Alternatively, use snort2lua and convert the Emerging Threats ruleset from snort 2.9.x to 3.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment