summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_openvpn.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-01-21 09:24:51 -0500
committerjim-p <jimp@pfsense.org>2013-01-21 09:25:42 -0500
commitec970b5004b0b613e539859212f45e0cc8aff96d (patch)
tree900522d663176b7fea9654a08cd1fd902ea84e82 /usr/local/www/status_openvpn.php
parent3dc76aa5d35290f9c5c231d0210191567ffa2d00 (diff)
downloadpfsense-ec970b5004b0b613e539859212f45e0cc8aff96d.zip
pfsense-ec970b5004b0b613e539859212f45e0cc8aff96d.tar.gz
Add routing table display for each OpenVPN ssl/tls server instance, collapsed by default. Part of feature #2766
Diffstat (limited to 'usr/local/www/status_openvpn.php')
-rw-r--r--usr/local/www/status_openvpn.php61
1 files changed, 58 insertions, 3 deletions
diff --git a/usr/local/www/status_openvpn.php b/usr/local/www/status_openvpn.php
index 330333d..9f7edc3 100644
--- a/usr/local/www/status_openvpn.php
+++ b/usr/local/www/status_openvpn.php
@@ -137,7 +137,7 @@ include("head.inc"); ?>
);
}
</script>
-
+<?php $i = 0; ?>
<?php foreach ($servers as $server): ?>
<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0">
@@ -192,14 +192,62 @@ include("head.inc"); ?>
<td colspan="6" class="list" height="12"></td>
</tr>
</tfoot>
-
</table>
</td>
</tr>
</table>
+<?php if (is_array($server['routes']) && count($server['routes'])): ?>
+<div id="shroutebut-<?= $i ?>">
+<input type="button" onClick="show_routes('tabroute-<?= $i ?>','shroutebut-<?= $i ?>')" value="<?php echo gettext("Show Routing Table"); ?>"></input> - Display OpenVPN's internal routing table for this server.</a>
+<br/><br/>
+</div>
+<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0" id="tabroute-<?= $i ?>">
+ <tr>
+ <td colspan="6" class="listtopic">
+ <?=$server['name'];?> <?=gettext("Routing Table"); ?>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="listhdrr"><?=gettext("Common Name"); ?></td>
+ <td class="listhdrr"><?=gettext("Real Address"); ?></td>
+ <td class="listhdrr"><?=gettext("Target Network"); ?></td>
+ <td class="listhdrr"><?=gettext("Last Used"); ?></td>
+ </tr>
+
+ <?php foreach ($server['routes'] as $conn): ?>
+ <tr name='<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>'>
+ <td class="listlr">
+ <?=$conn['common_name'];?>
+ </td>
+ <td class="listr">
+ <?=$conn['remote_host'];?>
+ </td>
+ <td class="listr">
+ <?=$conn['virtual_addr'];?>
+ </td>
+ <td class="listr">
+ <?=$conn['last_time'];?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ <tfoot>
+ <tr>
+ <td colspan="6" class="list" height="12"><?= gettext("An IP address followed by C indicates a host currently connected through the VPN.") ?></td>
+ </tr>
+ </tfoot>
+ </table>
+ </td>
+ </tr>
+</table>
+<?php endif; ?>
+<br/>
+<?php $i++; ?>
<?php endforeach; ?>
-<br>
+<br/>
<?php if (!empty($sk_servers)) { ?>
<table style="padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px" width="100%" border="0" cellpadding="0" cellspacing="0">
@@ -314,3 +362,10 @@ if ((empty($clients)) && (empty($servers)) && (empty($sk_servers))) {
<?php include("fend.inc"); ?>
+<script type="text/javascript">
+function show_routes(id, buttonid) {
+ document.getElementById(buttonid).innerHTML='';
+ aodiv = document.getElementById(id);
+ aodiv.style.display = "block";
+}
+</script>
OpenPOWER on IntegriCloud