From ac6c2a7a83a36ecc1fd979db48a042d5edf156df Mon Sep 17 00:00:00 2001
From: robiscool
Date: Fri, 2 Oct 2009 21:43:05 -0700
Subject: snort-dev, mirror snort satble with snort-dev
---
config/snort-dev/snort.inc | 73 ++++++++++++++++++++++++++++++++-----
config/snort-dev/snort_blocked.php | 33 ++++++++++++++++-
config/snort-dev/snort_rules.php | 64 +++++++++++++++++++++++++++++++-
config/snort-dev/snort_rulesets.php | 66 +++++++++++++++++++++++++++++++--
4 files changed, 220 insertions(+), 16 deletions(-)
(limited to 'config/snort-dev')
diff --git a/config/snort-dev/snort.inc b/config/snort-dev/snort.inc
index ebcab85c..107dfb3e 100644
--- a/config/snort-dev/snort.inc
+++ b/config/snort-dev/snort.inc
@@ -196,7 +196,6 @@ function create_barnyard2_conf() {
global $bconfig, $bg;
/* write out barnyard2_conf */
$barnyard2_conf_text = generate_barnyard2_conf();
-// conf_mount_rw();
$bconf = fopen("/usr/local/etc/barnyard2.conf", "w");
if(!$bconf) {
log_error("Could not open /usr/local/etc/barnyard2.conf for writing.");
@@ -204,7 +203,6 @@ function create_barnyard2_conf() {
}
fwrite($bconf, $barnyard2_conf_text);
fclose($bconf);
-// conf_mount_ro();
}
/* open barnyard2.conf for writing" */
function generate_barnyard2_conf() {
@@ -213,28 +211,56 @@ function generate_barnyard2_conf() {
conf_mount_rw();
/* define snortbarnyardlog */
+/* TODO add support for the other 5 output plugins */
+
$snortbarnyardlog_database_info_chk = $config['installedpackages']['snortadvanced']['config'][0]['snortbarnyardlog_database'];
+$snortbarnyardlog_hostname_info_chk = $config['installedpackages']['snortadvanced']['config'][0]['snortbarnyardlog_hostname'];
+$snortbarnyardlog_interface_info_chk = $config['installedpackages']['snortadvanced']['config'][0]['snortbarnyardlog_interface'];
$barnyard2_conf_text = <<
-This page lists hosts that have been blocked by Snort. Hosts are automatically deleted every 60 minutes.
+
+
";
+
+echo "\n
+\n
+\n
+ \n
+ \n";
+
+ $tab_array = array();
+ $tab_array[] = array(gettext("Settings"), false, "/pkg_edit.php?xml=snort.xml&id=0");
+ $tab_array[] = array(gettext("Update Rules"), false, "/snort_download_rules.php");
+ $tab_array[] = array(gettext("Categories"), false, "/snort_rulesets.php");
+ $tab_array[] = array(gettext("Rules"), true, "/snort_rules.php");
+ $tab_array[] = array(gettext("Servers"), false, "/pkg_edit.php?xml=snort_define_servers.xml&id=0");
+ $tab_array[] = array(gettext("Blocked"), false, "/snort_blocked.php");
+ $tab_array[] = array(gettext("Whitelist"), false, "/pkg.php?xml=snort_whitelist.xml");
+ $tab_array[] = array(gettext("Threshold"), false, "/pkg.php?xml=snort_threshold.xml");
+ $tab_array[] = array(gettext("Alerts"), false, "/snort_alerts.php");
+ $tab_array[] = array(gettext("Advanced"), false, "/pkg_edit.php?xml=snort_advanced.xml&id=0");
+ display_top_tabs($tab_array);
+
+echo " | \n
+
\n
+ \n
+ \n
+ \n
+ \n
+ \n
+ \n
+# The rules directory is empty.\n
+ | \n
+ \n
+ \n
+ \n
+ | \n
+
\n
+
\n
+\n
+\n
+\n
+\n\n";
+
+echo "Please click on the Update Rules tab to install your selected rule sets.";
+include("fend.inc");
+
+echo "