aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/snort/snort.inc12
-rw-r--r--packages/snort/snort.xml6
2 files changed, 16 insertions, 2 deletions
diff --git a/packages/snort/snort.inc b/packages/snort/snort.inc
index 0ec73237..758e406d 100644
--- a/packages/snort/snort.inc
+++ b/packages/snort/snort.inc
@@ -56,9 +56,17 @@ function sync_package_snort() {
$first = 1;
}
}
+
+ /* create log directory */
$start = "/bin/mkdir -p /var/log/snort";
- $start .= ";snort -c {$snort_conf_file} -l /var/log/snort " . $ifaces_final . " -D";
- $start .= ";snort2c -s -w /var/db/whitelist -a /var/log/snort/alert";
+
+ /* start snort */
+ $start .= ";snort -c {$snort_conf_file} -l /var/log/snort {$ifaces_final} -D";
+
+ /* if block offenders is checked, start snort2c */
+ if($_POST['blockoffenders'])
+ $start .= ";snort2c -s -w /var/db/whitelist -a /var/log/snort/alert";
+
write_rcfile(array(
"file" => "snort.sh",
"start" => $start,
diff --git a/packages/snort/snort.xml b/packages/snort/snort.xml
index 2ba391c8..528687b6 100644
--- a/packages/snort/snort.xml
+++ b/packages/snort/snort.xml
@@ -102,6 +102,12 @@
<type>input</type>
<size>60</size>
</field>
+ <field>
+ <fielddescr>Block offenders</fielddescr>
+ <fieldname>blockoffenders</fieldname>
+ <type>checkbox</type>
+ <size>60</size>
+ </field>
</fields>
<service>
<name>snort</name>