Prevention Engine developed by the Open Information Security Foundation (OISF). This engine is not intended to just replace or emulate the existing tools in the industry, but will bring new ideas and technologies to the field. OISF is part of and funded by the Department of Homeland Security's Directorate for Science and Technology HOST program (Homeland Open Security Technology), by the the Navy's Space and Naval Warfare Systems Command (SPAWAR), as well as through the very generous support of the members of the OISF Consortium. More information about the Consortium is available, as well as a list of our current Consortium Members. The Suricata Engine and the HTP Library are available to use under the GPLv2. The HTP Library is an HTTP normalizer and parser written by Ivan Ristic of Mod Security fame for the OISF. This integrates and provides very advanced processing of HTTP streams for Suricata. The HTP library is required by the engine but may also be used independently in a range of applications and tools. WWW: http://openinfosecfoundation.org PR: ports/150191 Submitted by: Patrick Tracanelli <eksffa@freebsdbrasil.com.br>
42 lines
1.5 KiB
Bash
42 lines
1.5 KiB
Bash
#!/bin/sh
|
|
# $FreeBSD$
|
|
|
|
# PROVIDE: suricata
|
|
# REQUIRE: DAEMON
|
|
# BEFORE: LOGIN
|
|
# KEYWORD: shutdown
|
|
|
|
# Add the following lines to /etc/rc.conf to enable suricata:
|
|
# suricata_enable (bool): Set to YES to enable suricata
|
|
# Default: NO
|
|
# suricata_flags (str): Extra flags passed to suricata
|
|
# Default: -D -q
|
|
# suricata_interface (str): Network interface to sniff
|
|
# Default: ""
|
|
# suricata_conf (str): Suricata configuration file
|
|
# Default: ${PREFIX}/etc/suricata/suricata.yaml
|
|
# suricata_divertport (int): Port to create divert socket (Inline Mode)
|
|
# Default: 8000
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="suricata"
|
|
rcvar=`set_rcvar`
|
|
|
|
command="%%PREFIX%%/bin/suricata"
|
|
|
|
load_rc_config $name
|
|
|
|
[ -z "$suricata_enable" ] && suricata_enable="NO"
|
|
[ -z "$suricata_conf" ] && suricata_conf="%%PREFIX%%/etc/suricata/suricata.yaml"
|
|
[ -z "$suricata_flags" ] && suricata_flags="-D"
|
|
[ -z "$suricata_divertport" ] && suricata_divertport="8000"
|
|
|
|
[ -n "$suricata_interface" ] && suricata_flags="$suricata_flags -i $suricata_interface --pidfile /var/run/suricata_${suricata_interface}.pid" \
|
|
&& pidfile="/var/run/suricata_${suricata_interface}.pid"
|
|
[ -z "$suricata_interface" ] && suricata_flags="$suricata_flags -d $suricata_divertport --pidfile /var/run/suricata_inline.pid" \
|
|
&& pidfile="/var/run/suricata_inline.pid" && info "Inline Mode on divert port $suricata_divertport (suricata_interface not defined)"
|
|
[ -n "$suricata_conf" ] && suricata_flags="$suricata_flags -c $suricata_conf"
|
|
|
|
run_rc_command "$1"
|