diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-09-26 00:33:13 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-09-26 00:33:13 +0000 |
commit | 6ab78495d8fab7bba91664789117b594fd56cb86 (patch) | |
tree | 89fa50880dcad499b3e638f42b5ec39cdb884a82 | |
parent | 5f8323d0ce3a87606952ed1a480baa533728aca6 (diff) | |
download | pfsense-packages-6ab78495d8fab7bba91664789117b594fd56cb86.tar.gz pfsense-packages-6ab78495d8fab7bba91664789117b594fd56cb86.tar.bz2 pfsense-packages-6ab78495d8fab7bba91664789117b594fd56cb86.zip |
Add block offenders checkbox
-rw-r--r-- | packages/snort/snort.inc | 12 | ||||
-rw-r--r-- | packages/snort/snort.xml | 6 |
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> |