diff options
Diffstat (limited to 'config/snort/snort_generate_conf.php')
-rw-r--r-- | config/snort/snort_generate_conf.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/config/snort/snort_generate_conf.php b/config/snort/snort_generate_conf.php index a5cc08d0..e3b38301 100644 --- a/config/snort/snort_generate_conf.php +++ b/config/snort/snort_generate_conf.php @@ -41,11 +41,17 @@ /* Custom home nets */ $home_net_list = snort_build_list($snortcfg, $snortcfg['homelistname']); $home_net = implode(",", $home_net_list); - -$external_net = '!$HOME_NET'; +$home_net = trim($home_net); +$external_net = ""; if (!empty($snortcfg['externallistname']) && $snortcfg['externallistname'] != 'default') { - $external_net_list = snort_build_list($snortcfg, $snortcfg['externallistname']); + $external_net_list = snort_build_list($snortcfg, $snortcfg['externallistname'], false, true); $external_net = implode(",", $external_net_list); + $external_net = "[" . trim($external_net) . "]"; +} +else { + foreach ($home_net_list as $ip) + $external_net .= "!{$ip},"; + $external_net = trim($external_net, ', '); } /* User added custom configuration arguments */ |