aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorjim-p <jim@pingle.org>2009-08-19 16:34:18 -0400
committerjim-p <jim@pingle.org>2009-08-19 16:34:18 -0400
commit707d22c25e523b1b87fb0066c876e93a13e57f6c (patch)
tree3599e511adb390bc042802d9663502711231757f /config
parent21a90838d1e7e7867e4ccd9d1849393254db425f (diff)
downloadpfsense-packages-707d22c25e523b1b87fb0066c876e93a13e57f6c.tar.gz
pfsense-packages-707d22c25e523b1b87fb0066c876e93a13e57f6c.tar.bz2
pfsense-packages-707d22c25e523b1b87fb0066c876e93a13e57f6c.zip
Fix some startup issues with the snort package
Diffstat (limited to 'config')
-rwxr-xr-xconfig/snort/snort.inc32
-rw-r--r--config/snort/snort.xml2
2 files changed, 18 insertions, 16 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc
index ccd80759..977ae761 100755
--- a/config/snort/snort.inc
+++ b/config/snort/snort.inc
@@ -119,15 +119,15 @@ function sync_package_snort()
//print_r($snortInterfaces);
/* create log directory */
- $start = "/bin/mkdir -p /var/log/snort";
+ $start = "/bin/mkdir -p /var/log/snort\n";
/* snort advanced features - bpf tuning */
if($bpfbufsize)
- $start .= ";sysctl net.bpf.bufsize={$bpfbufsize}";
+ $start .= "sysctl net.bpf.bufsize={$bpfbufsize}\n";
if($bpfmaxbufsize)
- $start .= ";sysctl net.bpf.maxbufsize={$bpfmaxbufsize}";
+ $start .= "sysctl net.bpf.maxbufsize={$bpfmaxbufsize}\n";
if($bpfmaxinsns)
- $start .= ";sysctl net.bpf.maxinsns={$bpfmaxinsns}";
+ $start .= "sysctl net.bpf.maxinsns={$bpfmaxinsns}\n";
/* go ahead and issue bpf changes */
if($bpfbufsize)
@@ -138,20 +138,22 @@ function sync_package_snort()
mwexec_bg("sysctl net.bpf.maxinsns={$bpfmaxinsns}");
/* always stop snort2c before starting snort -gtm */
- $start .= ";/usr/bin/killall snort2c";
-
- /* start a snort process for each interface -gtm */
- /* Note the sleep delay. Seems to help getting mult interfaces to start -gtm */
- /* snort start options are; config file, log file, demon, interface, packet flow, alert type, quiet */
- /* TODO; get snort to start under nologin shell */
- foreach($snortInterfaces as $snortIf)
- {
- $start .= ";sleep 8;snort -c /usr/local/etc/snort/snort.conf -l /var/log/snort -D -i {$snortIf} -q";
- }
+ $start .= "/usr/bin/killall snort2c\n";
+
+ /* start a snort process for each interface -gtm */
+ /* Note the sleep delay. Seems to help getting mult interfaces to start -gtm */
+ /* snort start options are; config file, log file, demon, interface, packet flow, alert type, quiet */
+ /* TODO; get snort to start under nologin shell */
+ foreach($snortInterfaces as $snortIf)
+ {
+ $start .= "sleep 8\n";
+ $start .= "snort -c /usr/local/etc/snort/snort.conf -l /var/log/snort -D -i {$snortIf} -q\n";
+ }
/* if block offenders is checked, start snort2c */
if($_POST['blockoffenders'])
- $start .= "\nsleep 8;snort2c -w /var/db/whitelist -a /var/log/snort/alert";
+ $start .= "\nsleep 8\n";
+ $start .= "snort2c -w /var/db/whitelist -a /var/log/snort/alert\n";
$sample_before = "\nBEFORE_MEM=`top | grep Free | grep Wired | awk '{print \$10}'`\n";
$sample_after = "\nAFTER_MEM=`top | grep Free | grep Wired | awk '{print \$10}'`\n";
diff --git a/config/snort/snort.xml b/config/snort/snort.xml
index 7cfd6a4f..a6064a04 100644
--- a/config/snort/snort.xml
+++ b/config/snort/snort.xml
@@ -47,7 +47,7 @@
<faq>Currently there are no FAQ items provided.</faq>
<name>Snort</name>
<version>2.8.4.1</version>
- <title>Services: Snort 2.8.4.1 pkg v. 1.4</title>
+ <title>Services: Snort 2.8.4.1 pkg v. 1.5</title>
<include_file>/usr/local/pkg/snort.inc</include_file>
<menu>
<name>Snort</name>