aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort-dev
diff options
context:
space:
mode:
authorrobiscool <robrob2626@yahoo.com>2010-03-16 23:37:56 -0700
committerrobiscool <robrob2626@yahoo.com>2010-03-16 23:37:56 -0700
commit3741dae76ea2aa19e478fac55e75acc663007eb7 (patch)
tree3655806b60cd262ffe44f6b0e1b1b300164a8f19 /config/snort-dev
parent0a744a91d045469839e80e566c5cfad4eebe01c7 (diff)
downloadpfsense-packages-3741dae76ea2aa19e478fac55e75acc663007eb7.tar.gz
pfsense-packages-3741dae76ea2aa19e478fac55e75acc663007eb7.tar.bz2
pfsense-packages-3741dae76ea2aa19e478fac55e75acc663007eb7.zip
snort-dev, update paths, update rules.
Diffstat (limited to 'config/snort-dev')
-rw-r--r--config/snort-dev/snort_interfaces_edit.php2
-rw-r--r--config/snort-dev/snort_rules.php8
-rw-r--r--config/snort-dev/snort_rulesets.php17
3 files changed, 18 insertions, 9 deletions
diff --git a/config/snort-dev/snort_interfaces_edit.php b/config/snort-dev/snort_interfaces_edit.php
index 45580d11..f91f56eb 100644
--- a/config/snort-dev/snort_interfaces_edit.php
+++ b/config/snort-dev/snort_interfaces_edit.php
@@ -444,7 +444,7 @@ if ($a_nat[$id]['interface'] != '') {
$tab_array = array();
$tab_array[] = array("Snort Interfaces", false, "/snort/snort_interfaces.php");
$tab_array[] = array("If Settings", true, "/snort/snort_interfaces_edit.php?id={$id}");
- $tab_array[] = array("Conf upload", false, "/snort/snort_conf_upload.php?id={$id}");
+ //$tab_array[] = array("upload", false, "/snort/snort_conf_upload.php?id={$id}");
$tab_array[] = array("Categories", false, "/snort/snort_rulesets.php?id={$id}");
$tab_array[] = array("Rules", false, "/snort/snort_rules.php?id={$id}");
$tab_array[] = array("Servers", false, "/snort/snort_define_servers.php?id={$id}");
diff --git a/config/snort-dev/snort_rules.php b/config/snort-dev/snort_rules.php
index 7a5a0cce..99e932b7 100644
--- a/config/snort-dev/snort_rules.php
+++ b/config/snort-dev/snort_rules.php
@@ -53,12 +53,14 @@ if (isset($id) && $a_nat[$id]) {
/* convert fake interfaces to real */
$if_real = convert_friendly_interface_to_real_interface_name($pconfig['interface']);
+$iface_uuid = $a_nat[$id]['uuid'];
+
// if(!is_dir("/usr/local/etc/snort/rules"))
// exec('mkdir /usr/local/etc/snort/rules/');
/* Check if the rules dir is empy if so warn the user */
/* TODO give the user the option to delete the installed rules rules */
-$isrulesfolderempty = exec("ls -A /usr/local/etc/snort/snort_{$id}{$if_real}/rules/*.rules");
+$isrulesfolderempty = exec("ls -A /usr/local/etc/snort/snort_{$iface_uuid}_{$if_real}/rules/*.rules");
if ($isrulesfolderempty == "") {
include("head.inc");
@@ -166,7 +168,7 @@ function load_rule_file($incoming_file)
}
-$ruledir = "/usr/local/etc/snort/snort_{$id}{$if_real}/rules/";
+$ruledir = "/usr/local/etc/snort/snort_{$iface_uuid}_{$if_real}/rules/";
$dh = opendir($ruledir);
if ($_GET['openruleset'] != '' && $_GET['ids'] != '')
@@ -404,7 +406,7 @@ $ifname = strtoupper($pconfig['interface']);
require("guiconfig.inc");
include("head.inc");
-$pgtitle = "Snort: Interface $id$if_real Rule Category: $currentruleset";
+$pgtitle = "Snort: $id $iface_uuid $if_real Category: $currentruleset";
?>
diff --git a/config/snort-dev/snort_rulesets.php b/config/snort-dev/snort_rulesets.php
index 3c99e608..dc3320fe 100644
--- a/config/snort-dev/snort_rulesets.php
+++ b/config/snort-dev/snort_rulesets.php
@@ -33,7 +33,7 @@ require_once("filter.inc");
require_once("service-utils.inc");
include_once("/usr/local/pkg/snort/snort.inc");
-$pgtitle = "Snort: Interface $id$if_real Categories";
+
if (!is_array($config['installedpackages']['snortglobal']['rule'])) {
$config['installedpackages']['snortglobal']['rule'] = array();
@@ -60,9 +60,16 @@ $if_real = convert_friendly_interface_to_real_interface_name($pconfig['interface
//if(!is_dir("/usr/local/etc/snort/rules"))
// exec('mkdir /usr/local/etc/snort/rules/');
+$iface_uuid = $a_nat[$id]['uuid'];
+
+$pgtitle = "Snort: Interface $id $iface_uuid $if_real Categories";
+
+
+
+
/* Check if the rules dir is empy if so warn the user */
/* TODO give the user the option to delete the installed rules rules */
-$isrulesfolderempty = exec("ls -A /usr/local/etc/snort/snort_{$id}{$if_real}/rules/*.rules");
+$isrulesfolderempty = exec("ls -A /usr/local/etc/snort/snort_{$iface_uuid}_{$if_real}/rules/*.rules");
if ($isrulesfolderempty == "") {
include("head.inc");
@@ -98,7 +105,7 @@ echo "</td>\n
<table id=\"maintable\" class=\"tabcont\" width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n
<tr>\n
<td>\n
-# The rules directory is empty. /usr/local/etc/snort/snort_{$id}{$if_real}/rules \n
+# The rules directory is empty. /usr/local/etc/snort/snort_{$iface_uuid}_{$if_real}/rules \n
</td>\n
</tr>\n
</table>\n
@@ -192,7 +199,7 @@ echo "<form action=\"snort_rulesets.php?id={$id}\" method=\"post\" name=\"iform\
<!-- <td class="listhdrr">Description</td> -->
</tr>
<?php
- $dir = "/usr/local/etc/snort/snort_{$id}{$if_real}/rules/";
+ $dir = "/usr/local/etc/snort/snort_{$iface_uuid}_{$if_real}/rules/";
$dh = opendir($dir);
while (false !== ($filename = readdir($dh))) {
$files[] = $filename;
@@ -214,7 +221,7 @@ echo "<form action=\"snort_rulesets.php?id={$id}\" method=\"post\" name=\"iform\
echo " <input type='checkbox' name='toenable[]' value='$file' {$CHECKED} />";
echo "</td>";
echo "<td>";
- echo "<a href='snort_rules.php?openruleset=/usr/local/etc/snort/snort_{$id}{$if_real}/rules/" . urlencode($file) . "'>{$file}</a>";
+ echo "<a href='snort_rules.php?openruleset=/usr/local/etc/snort/snort_{$iface_uuid}_{$if_real}/rules/" . urlencode($file) . "'>{$file}</a>";
echo "</td>";
//echo "<td>";
//echo "description";