From ffc45ec8be2950474f43e2a7d84590d7416cbfd0 Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Wed, 2 Apr 2014 15:14:19 -0400 Subject: Add support for IP Reputation preprocessor. --- config/snort/snort_ip_reputation.php | 474 +++++++++++++++++++++++++++++++++++ 1 file changed, 474 insertions(+) create mode 100644 config/snort/snort_ip_reputation.php (limited to 'config/snort/snort_ip_reputation.php') diff --git a/config/snort/snort_ip_reputation.php b/config/snort/snort_ip_reputation.php new file mode 100644 index 00000000..a59021db --- /dev/null +++ b/config/snort/snort_ip_reputation.php @@ -0,0 +1,474 @@ + 4095) + $input_errors[] = gettext("The value for Memory Cap must be an integer between 1 and 4095."); + + // if no errors write to conf + if (!$input_errors) { + + $natent['reputation_preproc'] = $_POST['reputation_preproc'] ? 'on' : 'off'; + $natent['iprep_scan_local'] = $_POST['iprep_scan_local'] ? 'on' : 'off'; + $natent['iprep_memcap'] = $_POST['iprep_memcap']; + $natent['iprep_priority'] = $_POST['iprep_priority']; + $natent['iprep_nested_ip'] = $_POST['iprep_nested_ip']; + $natent['iprep_white'] = $_POST['iprep_white']; + + $a_nat[$id] = $natent; + + write_config(); + + // Update the snort conf file for this interface + $rebuild_rules = false; + snort_generate_conf($a_nat[$id]); + + // Soft-restart Snort to live-load new variables + snort_reload_config($a_nat[$id]); + $pconfig = $natent; + } + else + $pconfig = $_POST; +} + +$if_friendly = convert_friendly_interface_to_friendly_descr($a_nat[$id]['interface']); +$pgtitle = gettext("Snort: Interface {$if_friendly} IP Reputation Preprocessor"); +include_once("head.inc"); + +?> + + + + +
+ + + + + + + '; + echo ' + + + + +
+
'; + $menu_iface=($if_friendly?substr($if_friendly,0,5)." ":"Iface "); + $tab_array = array(); + $tab_array[] = array($menu_iface . gettext(" Settings"), false, "/snort/snort_interfaces_edit.php?id={$id}"); + $tab_array[] = array($menu_iface . gettext("Categories"), false, "/snort/snort_rulesets.php?id={$id}"); + $tab_array[] = array($menu_iface . gettext("Rules"), false, "/snort/snort_rules.php?id={$id}"); + $tab_array[] = array($menu_iface . gettext("Variables"), false, "/snort/snort_define_servers.php?id={$id}"); + $tab_array[] = array($menu_iface . gettext("Preprocs"), false, "/snort/snort_preprocessors.php?id={$id}"); + $tab_array[] = array($menu_iface . gettext("Barnyard2"), false, "/snort/snort_barnyard.php?id={$id}"); + $tab_array[] = array($menu_iface . gettext("IP Rep"), true, "/snort/snort_ip_reputation.php?id={$id}"); + display_top_tabs($tab_array, true); + ?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ /> + " . gettext("Not Checked.") . ""; ?> +
  + " . + gettext("500.") . "
" . gettext("The Minimum value is ") . + "" . gettext("1 MB") . "" . gettext(" and the Maximum is ") . "" . + gettext("4095 MB.") . " " . gettext("Enter an integer value between 1 and 4095."); ?>
+
+ /> + " . gettext("Not Checked.") . ""; ?>
+

+ +
+ /> +  /> +  /> +
+ " . gettext("Inner") . "."; ?> +
+ /> +  /> +
+ " . gettext("Default is ") . "" . gettext("Whitelist") . "."; ?> +
+ /> +  /> +
+ " . gettext("Unblack") . "."; ?> +
  + " /> +    +
+ + + + + + + + + + + + + + + + + + $f): + $class = "listr"; + if (!file_exists("{$iprep_path}{$f}")) { + $filedate = gettext("Unknown -- file missing"); + $class .= " red"; + } + else + $filedate = date('M-d Y g:i a', filemtime("{$iprep_path}{$f}")); + ?> + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + $f): + $class = "listr"; + if (!file_exists("{$iprep_path}{$f}")) { + $filedate = gettext("Unknown -- file missing"); + $class .= " red"; + } + else + $filedate = date('M-d Y g:i a', filemtime("{$iprep_path}{$f}")); + ?> + + + + + + + + + + +
+
+
+
+
+
+ + + + + + -- cgit v1.2.3