]> git.ipfire.org Git - ipfire-2.x.git/commit - html/cgi-bin/ids.cgi
ids.cgi: Add backend code to handle switch between IDS and IPS mode
authorStefan Schantl <stefan.schantl@ipfire.org>
Sat, 18 Aug 2018 12:48:30 +0000 (14:48 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sat, 18 Aug 2018 13:10:44 +0000 (15:10 +0200)
commitbbb6efae56957c1ec70d5ee7668c4cc68b4dd2b2
tree9aa7f58cb3a748ee819c5f884194f5cd0842c5bd
parenta4ccfcbbc6073684768d951006232d410df091a1
ids.cgi: Add backend code to handle switch between IDS and IPS mode

This commit adds the required backend code to allow switching
between IDS and IPS mode of suricata.

Technically the behaviour of suricata is specified by the rules -
each of them can contain the action "alert" or "drop" (There are
more actions supported but these two are currently the important one)

When running in IDS mode, the ruleset does not need to be touched,
because the default action is "alert". When switching to IPS mode,
the CGI writes a single line to "oinkmaster-modify-sids.conf" which
is included by oinkmaster and modify the action for each single rule
from alert to drop.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/ids.cgi