diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2014-08-30 12:22:42 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2014-08-30 12:22:42 -0400 |
commit | 93b31c59eaa2dbde1720fa85ee42c53b46db2cab (patch) | |
tree | 6c1f3f633b66b80a31baa8b2d3b736acec8fa7ad /config/suricata/suricata_list_view.php | |
parent | a23e600747047c0b94e0680141562f51d1f13f1f (diff) | |
download | pfsense-packages-93b31c59eaa2dbde1720fa85ee42c53b46db2cab.tar.gz pfsense-packages-93b31c59eaa2dbde1720fa85ee42c53b46db2cab.tar.bz2 pfsense-packages-93b31c59eaa2dbde1720fa85ee42c53b46db2cab.zip |
Suricata prefers CIDR masks on HOME_NET and EXTERNAL_NET addresses.
Diffstat (limited to 'config/suricata/suricata_list_view.php')
-rw-r--r-- | config/suricata/suricata_list_view.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/config/suricata/suricata_list_view.php b/config/suricata/suricata_list_view.php index dc5a2b04..ec335abd 100644 --- a/config/suricata/suricata_list_view.php +++ b/config/suricata/suricata_list_view.php @@ -42,7 +42,7 @@ $type = htmlspecialchars($_GET['type']); $title = "List"; if (isset($id) && isset($wlist)) { - $a_rule = $config['installedpackages']['suricataglobal']['rule'][$id]; + $a_rule = $config['installedpackages']['suricata']['rule'][$id]; if ($type == "homenet") { $list = suricata_build_list($a_rule, $wlist); $contents = implode("\n", $list); @@ -59,8 +59,17 @@ if (isset($id) && isset($wlist)) { $title = "Suppress List"; } elseif ($type == "externalnet") { - $list = suricata_build_list($a_rule, $wlist, false, true); - $contents = implode("\n", $list); + if ($wlist == "default") { + $list = suricata_build_list($a_rule, $a_rule['homelistname']); + $contents = ""; + foreach ($list as $ip) + $contents .= "!{$ip}\n"; + $contents = trim($contents, "\n"); + } + else { + $list = suricata_build_list($a_rule, $wlist, false, true); + $contents = implode("\n", $list); + } $title = "EXTERNAL_NET"; } else |