aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort-dev/snort_interfaces_whitelist.php
diff options
context:
space:
mode:
authorrobiscool <robrob2626@yahoo.com>2011-05-06 13:08:28 -0700
committerrobiscool <robrob2626@yahoo.com>2011-05-06 13:08:28 -0700
commitc0076cc80d8c3689ffacff0a61f6d5a76c30b70c (patch)
tree56617399385ca9868de39e822f289291390173f6 /config/snort-dev/snort_interfaces_whitelist.php
parent007a2e17c59e36d5f59457d1df50f722d8fb9d64 (diff)
downloadpfsense-packages-c0076cc80d8c3689ffacff0a61f6d5a76c30b70c.tar.gz
pfsense-packages-c0076cc80d8c3689ffacff0a61f6d5a76c30b70c.tar.bz2
pfsense-packages-c0076cc80d8c3689ffacff0a61f6d5a76c30b70c.zip
snort-dev, add neww files
Diffstat (limited to 'config/snort-dev/snort_interfaces_whitelist.php')
-rw-r--r--config/snort-dev/snort_interfaces_whitelist.php66
1 files changed, 43 insertions, 23 deletions
diff --git a/config/snort-dev/snort_interfaces_whitelist.php b/config/snort-dev/snort_interfaces_whitelist.php
index 189770f2..0ceed8c0 100644
--- a/config/snort-dev/snort_interfaces_whitelist.php
+++ b/config/snort-dev/snort_interfaces_whitelist.php
@@ -38,12 +38,18 @@ require_once("/usr/local/pkg/snort/snort_new.inc");
require_once("/usr/local/pkg/snort/snort_gui.inc");
-$a_whitelist = snortSql_fetchAllWhitelistTypes('SnortWhitelist');
+$a_whitelist = snortSql_fetchAllWhitelistTypes('SnortWhitelist', 'SnortWhitelistips');
- if ($a_whitelist == 'Error') {
- echo 'Error';
- exit(0);
- }
+ if (!is_array($a_whitelist))
+ {
+ $a_whitelist = array();
+ }
+
+ if ($a_whitelist == 'Error')
+ {
+ echo 'Error';
+ exit(0);
+ }
$pgtitle = "Services: Snort: Whitelist";
include("/usr/local/pkg/snort/snort_head.inc");
@@ -68,10 +74,6 @@ $a_whitelist = snortSql_fetchAllWhitelistTypes('SnortWhitelist');
<div class="body2"><!-- hack to fix the hardcoed fbegin link in header -->
<div id="header-left2"><a href="../index.php" id="status-link2"><img src="./images/transparent.gif" border="0"></img></a></div>
-<? //if($pfsense_stable == 'yes'){echo '<p class="pgtitle">' . $pgtitle . '</p>';}
-echo '<p class="pgtitle">' . $pgtitle . '</p>';
-?>
-
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
@@ -93,24 +95,24 @@ echo '<p class="pgtitle">' . $pgtitle . '</p>';
</td>
</tr>
<tr>
- <td id="tdbggrey">
+ <td id="tdbggrey">
<table width="100%" border="0" cellpadding="10px" cellspacing="0">
<tr>
<td class="tabnavtbl">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<!-- START MAIN AREA -->
- <tr id="maintable" data-options='{"pagetable":"SnortWhitelist"}'> <!-- db to lookup -->
+ <tr> <!-- db to lookup -->
<td width="20%" class="listhdrr">File Name</td>
<td width="45%" class="listhdrr">Values</td>
<td width="35%" class="listhdr">Description</td>
<td width="10%" class="list"></td>
</tr>
- <?php $i = 1; foreach ($a_whitelist as $list): ?>
- <tr id="rowlist_<?=$i;?>" class="icon_xrow" data-options='{"rowuuid":"<?=$list['uuid'];?>"}' >
- <td id="rowfilename<?=$i;?>" class="listlr" ondblclick="document.location='snort_interfaces_whitelist_edit.php?id=<?=$i;?>';"><?=$list['filename'];?></td>
- <td class="listr" ondblclick="document.location='snort_interfaces_whitelist_edit.php?id=<?=$i;?>';">
- <?php
+ <?php foreach ($a_whitelist as $list): ?>
+ <tr id="maintable_<?=$list['uuid']?>" data-options='{"pagetable":"SnortWhitelist", "pagedb":"snortDB", "DoPOST":"true"}' >
+ <td class="listlr" ondblclick="document.location='snort_interfaces_whitelist_edit.php?uuid=<?=$list['uuid'];?>'"><?=$list['filename'];?></td>
+ <td class="listr" ondblclick="document.location='snort_interfaces_whitelist_edit.php?uuid=<?=$list['uuid'];?>'">
+ <?php
$a = 0;
$countList = count($list['list']);
foreach ($list['list'] as $value)
@@ -138,7 +140,7 @@ echo '<p class="pgtitle">' . $pgtitle . '</p>';
}
?>
</td>
- <td class="listbg" ondblclick="document.location='snort_interfaces_whitelist_edit.php?id=<?=$i;?>';">
+ <td class="listbg" ondblclick="document.location='snort_interfaces_whitelist_edit.php?uuid=<?=$list['uuid'];?>'">
<font color="#FFFFFF"> <?=htmlspecialchars($list['description']);?>&nbsp;
</td>
<td valign="middle" nowrap class="list">
@@ -148,7 +150,7 @@ echo '<p class="pgtitle">' . $pgtitle . '</p>';
<a href="snort_interfaces_whitelist_edit.php?uuid=<?=$list['uuid'];?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif"width="17" height="17" border="0" title="edit whitelist"></a>
</td>
<td>
- <img id="icon_x_<?=$i;?>" class="icon_click icon_x" src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="delete list" >
+ <img id="icon_x_<?=$list['uuid'];?>" class="icon_click icon_x" src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="delete list" >
</a>
</td>
</tr>
@@ -167,19 +169,37 @@ echo '<p class="pgtitle">' . $pgtitle . '</p>';
</table>
</td>
</tr>
- </table>
+ </table>
</td>
- </tr>
-
-
+ </tr>
+
<!-- STOP MAIN AREA -->
</table>
</td>
- </tr>
+ </tr>
+
</table>
</td>
</tr>
</table>
+
+<!-- 2nd box note -->
+<br>
+<div id=mainarea4>
+<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <td width="100%">
+ <span class="vexpl">
+ <span class="red"><strong>Note:</strong></span>
+ <p><span class="vexpl">
+ Here you can create whitelist files for your snort package rules.<br>
+ Please add all the ips or networks you want to protect against snort block decisions.<br>
+ Remember that the default whitelist only includes local networks.<br>
+ Be careful, it is very easy to get locked out of you system.
+ </span></p>
+ </td>
+</table>
+</div>
+
</div>