aboutsummaryrefslogtreecommitdiffstats
path: root/config/suricata/suricata_generate_yaml.php
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-12-05 00:03:31 -0500
committerbmeeks8 <bmeeks8@bellsouth.net>2014-12-15 12:15:45 -0500
commit94aafa5bcef07d85b2fdc820457594ce047f425e (patch)
tree367af32d7766d94ef52e8873ac00bd952bb3315b /config/suricata/suricata_generate_yaml.php
parentd7334cf34d4a7e2825137d96c06e5a8327f7520c (diff)
downloadpfsense-packages-94aafa5bcef07d85b2fdc820457594ce047f425e.tar.gz
pfsense-packages-94aafa5bcef07d85b2fdc820457594ce047f425e.tar.bz2
pfsense-packages-94aafa5bcef07d85b2fdc820457594ce047f425e.zip
Add support for IP REPUTATION to GUI code.
Diffstat (limited to 'config/suricata/suricata_generate_yaml.php')
-rw-r--r--config/suricata/suricata_generate_yaml.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/config/suricata/suricata_generate_yaml.php b/config/suricata/suricata_generate_yaml.php
index 704caa76..1ace4044 100644
--- a/config/suricata/suricata_generate_yaml.php
+++ b/config/suricata/suricata_generate_yaml.php
@@ -702,6 +702,32 @@ else
/* Configure the IP REP section */
$iprep_path = rtrim(SURICATA_IPREP_PATH, '/');
+$iprep_config = "# IP Reputation\n";
+if ($suricatacfg['enable_iprep'] == "on") {
+ $iprep_config .= "default-reputation-path: {$iprep_path}\n";
+ $iprep_config .= "reputation-categories-file: {$iprep_path}/{$suricatacfg['iprep_catlist']}\n";
+ $iprep_config .= "reputation-files:";
+
+ if (!is_array($suricatacfg['iplist_files']['item']))
+ $suricatacfg['iplist_files']['item'] = array();
+
+ foreach ($suricatacfg['iplist_files']['item'] as $f)
+ $iprep_config .= "\n - $f";
+}
+
+/* Configure Host Table settings */
+if (!empty($suricatacfg['host_memcap']))
+ $host_memcap = $suricatacfg['host_memcap'];
+else
+ $host_memcap = "16777216";
+if (!empty($suricatacfg['host_hash_size']))
+ $host_hash_size = $suricatacfg['host_hash_size'];
+else
+ $host_hash_size = "4096";
+if (!empty($suricatacfg['host_prealloc']))
+ $host_prealloc = $suricatacfg['host_prealloc'];
+else
+ $host_prealloc = "1000";
// Create the rules files and save in the interface directory
suricata_prepare_rule_files($suricatacfg, $suricatacfgdir);