From 0cb2cf75ad9fa5ad9ddbe6f3b0773b1e13e95bbb Mon Sep 17 00:00:00 2001 From: robiscool Date: Sat, 24 Apr 2010 19:52:48 -0700 Subject: snort, update loopback whitelist code --- config/snort/snort.inc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/snort/snort.inc b/config/snort/snort.inc index a41b415c..dbad74e8 100644 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -127,10 +127,12 @@ global $config, $g; } /* Add loopback to whitelist (ftphelper) */ - if($userwips == 'no') { - $home_net .= "127.0.0.1"; - }else{ + if($userwips > -1 && $build_netlist == 'netlist') { + $home_net .= "127.0.0.1 "; + }elseif ($userwips > -1 && $build_netlist == 'whitelist') { $home_net .= "127.0.0.1 "; + }else{ + $home_net .= "127.0.0.1"; } /* grab a list of vpns and whitelist if user desires added by nestorfish 954 */ @@ -160,7 +162,7 @@ global $config, $g; } /* this foe whitelistfile, convert spaces to carriage returns */ - $whitelist_home_net = str_replace(" ", " ", $home_net); + $whitelist_home_net = str_replace(" ", "\n", $home_net); $whitelist_home_net = str_replace(" ", "\n", $home_net); /* this is for snort.conf */ -- cgit v1.2.3