aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort/snort_interfaces.php
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-07-23 15:37:29 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-07-23 15:37:29 -0400
commitae3323845cd71bfae33f12203e6362f03fc634d9 (patch)
tree38295cc2d83fec4133aa91af0150c4b49704e3b9 /config/snort/snort_interfaces.php
parent413a8566ef8508972e1f663f269619f26a9c543a (diff)
downloadpfsense-packages-ae3323845cd71bfae33f12203e6362f03fc634d9.tar.gz
pfsense-packages-ae3323845cd71bfae33f12203e6362f03fc634d9.tar.bz2
pfsense-packages-ae3323845cd71bfae33f12203e6362f03fc634d9.zip
Update Snort package to latest 2.9.6.2 binary and fix some GUI bugs.
Diffstat (limited to 'config/snort/snort_interfaces.php')
-rwxr-xr-xconfig/snort/snort_interfaces.php73
1 files changed, 56 insertions, 17 deletions
diff --git a/config/snort/snort_interfaces.php b/config/snort/snort_interfaces.php
index c82ec57e..8b2ca2bb 100755
--- a/config/snort/snort_interfaces.php
+++ b/config/snort/snort_interfaces.php
@@ -45,6 +45,9 @@ $a_nat = &$config['installedpackages']['snortglobal']['rule'];
// Calculate the index of the next added Snort interface
$id_gen = count($config['installedpackages']['snortglobal']['rule']);
+// Get list of configured firewall interfaces
+$ifaces = get_configured_interface_list();
+
if (isset($_POST['del_x'])) {
/* Delete selected Snort interfaces */
if (is_array($_POST['rule'])) {
@@ -73,7 +76,7 @@ if (isset($_POST['del_x'])) {
snort_create_rc();
else {
conf_mount_rw();
- @unlink("{$rcdir}/snort.sh");
+ @unlink("{$rcdir}snort.sh");
conf_mount_ro();
}
@@ -173,18 +176,33 @@ include_once("fbegin.inc");
<tr id="frheader">
<td width="3%" class="list">&nbsp;</td>
<td width="10%" class="listhdrr"><?php echo gettext("Interface"); ?></td>
- <td width="13%" class="listhdrr"><?php echo gettext("Snort"); ?></td>
+ <td width="14%" class="listhdrr"><?php echo gettext("Snort"); ?></td>
<td width="10%" class="listhdrr"><?php echo gettext("Performance"); ?></td>
<td width="10%" class="listhdrr"><?php echo gettext("Block"); ?></td>
<td width="12%" class="listhdrr"><?php echo gettext("Barnyard2"); ?></td>
- <td width="30%" class="listhdr"><?php echo gettext("Description"); ?></td>
- <td width="3%" class="list">
+ <td width="32%" class="listhdr"><?php echo gettext("Description"); ?></td>
+ <td class="list">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td></td>
- <td align="center" valign="middle"><a href="snort_interfaces_edit.php?id=<?php echo $id_gen;?>"><img
- src="../themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif"
- width="17" height="17" border="0" title="<?php echo gettext('Add Snort interface mapping');?>"></a></td>
+ <td class="list" valign="middle">
+ <?php if ($id_gen < count($ifaces)): ?>
+ <a href="snort_interfaces_edit.php?id=<?php echo $id_gen;?>">
+ <img src="../themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif"
+ width="17" height="17" border="0" title="<?php echo gettext('Add Snort interface mapping');?>"></a>
+ <?php else: ?>
+ <img src="../themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" width="17" height="17" border="0"
+ title="<?php echo gettext('No available interfaces for a new Snort mapping');?>">
+ <?php endif; ?>
+ </td>
+ <td class="list" valign="middle">
+ <?php if ($id_gen == 0): ?>
+ <img src="../themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" " border="0">
+ <?php else: ?>
+ <input name="del" type="image" src="../themes/<?= $g['theme']; ?>/images/icons/icon_x.gif"
+ width="17" height="17" title="<?php echo gettext("Delete selected Snort interface mapping(s)"); ?>"
+ onclick="return intf_del()">
+ <?php endif; ?>
+ </td>
</tr>
</table>
</td>
@@ -317,10 +335,20 @@ include_once("fbegin.inc");
<td valign="middle" class="list" nowrap>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td><a href="snort_interfaces_edit.php?id=<?=$i;?>"><img
+ <td class="list" valign="middle"><a href="snort_interfaces_edit.php?id=<?=$i;?>"><img
src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif"
width="17" height="17" border="0" title="<?php echo gettext('Edit Snort interface mapping'); ?>"></a>
</td>
+ <td class="list" valign="middle">
+ <?php if ($id_gen < count($ifaces)): ?>
+ <a href="snort_interfaces_edit.php?id=<?=$i;?>&action=dup">
+ <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif"
+ width="17" height="17" border="0" title="<?php echo gettext('Add new interface mapping based on this one'); ?>"></a>
+ <?php else: ?>
+ <img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" width="17" height="17" border="0"
+ title="<?php echo gettext('No available interfaces for a new Snort mapping');?>">
+ <?php endif; ?>
+ </td>
</tr>
</table>
</td>
@@ -337,14 +365,25 @@ include_once("fbegin.inc");
<td class="list" valign="middle" nowrap>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td><?php if ($nnats == 0): ?><img
- src="../themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif"
- width="17" height="17" " border="0">
- <?php else: ?>
- <input name="del" type="image" src="../themes/<?= $g['theme']; ?>/images/icons/icon_x.gif"
- width="17" height="17" title="<?php echo gettext("Delete selected Snort interface mapping(s)"); ?>"
- onclick="return intf_del()">
- <?php endif; ?></td>
+ <td class="list">
+ <?php if ($id_gen < count($ifaces)): ?>
+ <a href="snort_interfaces_edit.php?id=<?php echo $id_gen;?>">
+ <img src="../themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif"
+ width="17" height="17" border="0" title="<?php echo gettext('Add Snort interface mapping');?>"></a>
+ <?php else: ?>
+ <img src="../themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" width="17" height="17" border="0"
+ title="<?php echo gettext('No available interfaces for a new Snort mapping');?>">
+ <?php endif; ?>
+ </td>
+ <td class="list">
+ <?php if ($id_gen == 0): ?>
+ <img src="../themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" " border="0">
+ <?php else: ?>
+ <input name="del" type="image" src="../themes/<?= $g['theme']; ?>/images/icons/icon_x.gif"
+ width="17" height="17" title="<?php echo gettext("Delete selected Snort interface mapping(s)"); ?>"
+ onclick="return intf_del()">
+ <?php endif; ?>
+ </td>
</tr>
</table>
</td>