From 94aafa5bcef07d85b2fdc820457594ce047f425e Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Fri, 5 Dec 2014 00:03:31 -0500 Subject: Add support for IP REPUTATION to GUI code. --- config/suricata/suricata_migrate_config.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'config/suricata/suricata_migrate_config.php') diff --git a/config/suricata/suricata_migrate_config.php b/config/suricata/suricata_migrate_config.php index a53b5ba4..75e13315 100644 --- a/config/suricata/suricata_migrate_config.php +++ b/config/suricata/suricata_migrate_config.php @@ -86,6 +86,14 @@ if (empty($config['installedpackages']['suricata']['config'][0]['autogeoipupdate $updated_cfg = true; } +/**********************************************************/ +/* Create new ET IQRisk IP Reputation setting if not set */ +/**********************************************************/ +if (empty($config['installedpackages']['suricata']['config'][0]['et_iqrisk_enable'])) { + $config['installedpackages']['suricata']['config'][0]['et_iqrisk_enable'] = "off"; + $updated_cfg = true; +} + // Now process the interface-specific settings foreach ($rule as &$r) { @@ -344,6 +352,26 @@ foreach ($rule as &$r) { $updated_cfg = true; } + /**********************************************************/ + /* Create interface IP Reputation settings if not set */ + /**********************************************************/ + if (empty($pconfig['enable_iprep'])) { + $pconfig['enable_iprep'] = "off"; + $updated_cfg = true; + } + if (empty($pconfig['host_memcap'])) { + $pconfig['host_memcap'] = "16777216"; + $updated_cfg = true; + } + if (empty($pconfig['host_hash_size'])) { + $pconfig['host_hash_size'] = "4096"; + $updated_cfg = true; + } + if (empty($pconfig['host_prealloc'])) { + $pconfig['host_prealloc'] = "1000"; + $updated_cfg = true; + } + // Save the new configuration data into the $config array pointer $r = $pconfig; } -- cgit v1.2.3