Skip to content

Instantly share code, notes, and snippets.

@isMTv
Created August 17, 2022 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isMTv/53c667ac2709f5e73d01ffffd922f20d to your computer and use it in GitHub Desktop.
Save isMTv/53c667ac2709f5e73d01ffffd922f20d to your computer and use it in GitHub Desktop.
/etc/systemd/system/suricata.service
# cat > /etc/systemd/system/suricata.service << EOF
[Unit]
Description=Suricata IDS/IDP daemon
After=network.target network-online.target
Requires=network-online.target
Documentation=man:suricata(8) man:suricatasc(8)
Documentation=https://suricata-ids.org/docs/
[Service]
Type=forking
#Environment=LD_PRELOAD=/usr/lib/libtcmalloc_minimal.so.4
PIDFile=/run/suricata.pid
ExecStart=/usr/bin/suricata -D --af-packet -c /etc/suricata/suricata.yaml --pidfile /run/suricata.pid
ExecReload=/usr/bin/suricatasc -c reload-rules ; /bin/kill -HUP $MAINPID
ExecStop=/usr/bin/suricatasc -c shutdown
Restart=on-failure
ProtectSystem=full
ProtectHome=true
[Install]
WantedBy=multi-user.target
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment