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 /packages/snort/snort.inc | |
parent | 5f8323d0ce3a87606952ed1a480baa533728aca6 (diff) | |
download | pfsense-packages-6ab78495d8fab7bba91664789117b594fd56cb86.tar.gz pfsense-packages-6ab78495d8fab7bba91664789117b594fd56cb86.tar.bz2 pfsense-packages-6ab78495d8fab7bba91664789117b594fd56cb86.zip |
Add block offenders checkbox
Diffstat (limited to 'packages/snort/snort.inc')
-rw-r--r-- | packages/snort/snort.inc | 12 |
1 files changed, 10 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, |