"; if($pfsense_stable == 'yes'){echo $pgtitle;} echo "

\n"; echo ""; echo " \n \n \n \n
\n"; $tab_array = array(); $tab_array[] = array(gettext("Snort Interfaces"), false, "/snort/snort_interfaces.php"); $tab_array[] = array(gettext("If Settings"), false, "/snort/snort_interfaces_edit.php?id={$id}"); $tab_array[] = array(gettext("Categories"), true, "/snort/snort_rulesets.php?id={$id}"); $tab_array[] = array(gettext("Rules"), false, "/snort/snort_rules.php?id={$id}"); $tab_array[] = array(gettext("Servers"), false, "/snort/snort_define_servers.php?id={$id}"); $tab_array[] = array(gettext("Preprocessors"), false, "/snort/snort_preprocessors.php?id={$id}"); $tab_array[] = array(gettext("Barnyard2"), false, "/snort/snort_barnyard.php?id={$id}"); display_top_tabs($tab_array); echo "
\n
\n \n \n \n \n
\n # The rules directory is empty. {$snortdir}/snort_{$iface_uuid}_{$if_real}/rules \n
\n
\n
\n \n \n \n

\n\n"; echo "Please click on the Update Rules tab to install your selected rule sets. $isrulesfolderempty"; include("fend.inc"); echo ""; echo ""; exit(0); } else { /* Make sure that we have the rules */ mwexec("/bin/cp {$snortdir}/rules/*.rules {$snortdir}/snort_{$iface_uuid}_{$if_real}/rules", true); } } /* alert file */ if ($_POST["Submit"]) { $enabled_items = ""; $isfirst = true; if (is_array($_POST['toenable'])) $enabled_items = implode("||", $_POST['toenable']); else $enabled_items = $_POST['toenable']; $a_nat[$id]['rulesets'] = $enabled_items; write_config(); sync_snort_package_config(); header("Location: /snort/snort_rulesets.php?id=$id"); exit; } if ($_POST['unselectall']) { $a_nat[$id]['rulesets'] = ""; write_config(); sync_snort_package_config(); header("Location: /snort/snort_rulesets.php?id=$id"); exit; } if ($_POST['selectall']) { $files = glob("{$snortdir}/snort_{$iface_uuid}_{$if_real}/rules/*.rules"); $rulesets = array(); foreach ($files as $file) $rulesets[] = basename($file); $a_nat[$id]['rulesets'] = implode("||", $rulesets); write_config(); sync_snort_package_config(); header("Location: /snort/snort_rulesets.php?id=$id"); exit; } $enabled_rulesets = $a_nat[$id]['rulesets']; if($enabled_rulesets) $enabled_rulesets_array = explode("||", $enabled_rulesets); include_once("head.inc"); ?> ' . $pgtitle . '

';}?>
";
\n"; if (!empty($emergingrules[$j])) { $file = $emergingrules[$j]; echo "\n"; echo "\n"; } else echo "\n"; if (!empty($snortrules[$j])) { $file = $snortrules[$j]; echo "\n"; echo "\n"; } else echo "\n"; if (!empty($snortsorules[$j])) { $file = $snortsorules[$j]; echo "\n"; echo "\n"; } else echo "\n"; echo "\n"; } ?>
Check the rulesets that you would like Snort to load at startup.







 
Enabled Enabled Enabled
"; if(is_array($enabled_rulesets_array)) { if(in_array($file, $enabled_rulesets_array)) $CHECKED = " checked=\"checked\""; else $CHECKED = ""; } else $CHECKED = ""; echo " \n\n"; echo "\n"; if (empty($CHECKED)) echo $file; else echo "{$file}\n"; echo "
"; if(is_array($enabled_rulesets_array)) { if(in_array($file, $enabled_rulesets_array)) $CHECKED = " checked=\"checked\""; else $CHECKED = ""; } else $CHECKED = ""; echo " \n\n"; echo "\n"; if (empty($CHECKED)) echo $file; else echo "{$file}\n"; echo "
"; if(is_array($enabled_rulesets_array)) { if(in_array($file, $enabled_rulesets_array)) $CHECKED = " checked=\"checked\""; else $CHECKED = ""; } else $CHECKED = ""; echo " \n\n"; echo "\n"; if (empty($CHECKED)) echo $file; else echo "{$file}\n"; echo "