Projet

Général

Profil

Télécharger (4,93 ko) Statistiques
| Branche: | Tag: | Révision:

univnautes / usr / local / www / diag_ipsec_spd.php @ 17402c63

1 4d875b4f Scott Ullrich
<?php
2 b46bfcf5 Bill Marquette
/* $Id$ */
3 5b237745 Scott Ullrich
/*
4
	diag_ipsec_spd.php
5 13d193c2 Scott Ullrich
	Copyright (C) 2004-2009 Scott Ullrich
6 4d875b4f Scott Ullrich
	All rights reserved.
7
8
	originially part of m0n0wall (http://m0n0.ch/wall)
9 5b237745 Scott Ullrich
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
10
	All rights reserved.
11 4d875b4f Scott Ullrich
12 5b237745 Scott Ullrich
	Redistribution and use in source and binary forms, with or without
13
	modification, are permitted provided that the following conditions are met:
14 4d875b4f Scott Ullrich
15 5b237745 Scott Ullrich
	1. Redistributions of source code must retain the above copyright notice,
16
	   this list of conditions and the following disclaimer.
17 4d875b4f Scott Ullrich
18 5b237745 Scott Ullrich
	2. Redistributions in binary form must reproduce the above copyright
19
	   notice, this list of conditions and the following disclaimer in the
20
	   documentation and/or other materials provided with the distribution.
21 4d875b4f Scott Ullrich
22 5b237745 Scott Ullrich
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
23
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
24
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
26
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
	POSSIBILITY OF SUCH DAMAGE.
32
*/
33
34 13d193c2 Scott Ullrich
/*
35 30c591d6 Ermal
	pfSense_BUILDER_BINARIES:	/sbin/setkey
36 13d193c2 Scott Ullrich
	pfSense_MODULE:	ipsec
37
*/
38
39 6b07c15a Matthew Grooms
##|+PRIV
40
##|*IDENT=page-status-ipsec-spd
41
##|*NAME=Status: IPsec: SPD page
42
##|*DESCR=Allow access to the 'Status: IPsec: SPD' page.
43
##|*MATCH=diag_ipsec_spd.php*
44
##|-PRIV
45
46 5b237745 Scott Ullrich
require("guiconfig.inc");
47 483e6de8 Scott Ullrich
require("ipsec.inc");
48 b63695db Scott Ullrich
49 f8ec8de4 Renato Botelho
$pgtitle = array(gettext("Status"),gettext("IPsec"),gettext("SPD"));
50 b32dd0a6 jim-p
$shortcut_section = "ipsec";
51 b63695db Scott Ullrich
include("head.inc");
52
53 a93e56c5 Matthew Grooms
$spd = ipsec_dump_spd();
54 5b237745 Scott Ullrich
?>
55 4d875b4f Scott Ullrich
56 a93e56c5 Matthew Grooms
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
57
	<?php include("fbegin.inc"); ?>
58 a8590dd6 Colin Fleming
	<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="status ipsec spd">
59 a93e56c5 Matthew Grooms
		<tr>
60
			<td>
61
				<?php
62
					$tab_array = array();
63 f8ec8de4 Renato Botelho
					$tab_array[0] = array(gettext("Overview"), false, "diag_ipsec.php");
64
					$tab_array[1] = array(gettext("SAD"), false, "diag_ipsec_sad.php");
65
					$tab_array[2] = array(gettext("SPD"), true, "diag_ipsec_spd.php");
66
					$tab_array[3] = array(gettext("Logs"), false, "diag_logs_ipsec.php");
67 a93e56c5 Matthew Grooms
					display_top_tabs($tab_array);
68
				?>
69
			</td>
70
		</tr>
71
		<tr>
72
			<td>
73
				<div id="mainarea" style="background:#eeeeee">
74 a8590dd6 Colin Fleming
					<table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
75 a93e56c5 Matthew Grooms
						<?php if (count($spd)): ?>
76
						<tr>
77 a8590dd6 Colin Fleming
							<td class="listhdrr nowrap"><?= gettext("Source"); ?></td>
78
							<td class="listhdrr nowrap"><?= gettext("Destination"); ?></td>
79
							<td class="listhdrr nowrap"><?= gettext("Direction"); ?></td>
80
							<td class="listhdrr nowrap"><?= gettext("Protocol"); ?></td>
81
							<td class="listhdrr nowrap"><?= gettext("Tunnel endpoints"); ?></td>
82
							<td class="list nowrap"></td>
83 a93e56c5 Matthew Grooms
						</tr>
84
						<?php foreach ($spd as $sp): ?>
85
						<tr>
86
							<td class="listlr" valign="top"><?=htmlspecialchars($sp['srcid']);?></td>
87
							<td class="listr" valign="top"><?=htmlspecialchars($sp['dstid']);?></td>
88
							<td class="listr" valign="top">
89 a8590dd6 Colin Fleming
								<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_<?=$sp['dir'];?>.gif" width="11" height="11" style="margin-top: 2px" alt="direction" />
90 a93e56c5 Matthew Grooms
							</td>
91
							<td class="listr" valign="top"><?=htmlspecialchars(strtoupper($sp['proto']));?></td>
92
							<td class="listr" valign="top"><?=htmlspecialchars($sp['src']);?> -> <?=htmlspecialchars($sp['dst']);?></td>
93 a8590dd6 Colin Fleming
							<td class="list nowrap">
94 a93e56c5 Matthew Grooms
								<?php
95
									$args = "srcid=".rawurlencode($sp['srcid']);
96 a8590dd6 Colin Fleming
									$args .= "&amp;dstid=".rawurlencode($sp['dstid']);
97
									$args .= "&amp;dir=".rawurlencode($sp['dir']);
98 a93e56c5 Matthew Grooms
								?>
99
							</td>
100
						</tr>
101
						<?php endforeach; ?>
102
					</table>
103 8cd558b6 ayvis
					<br />
104 a8590dd6 Colin Fleming
					<table class="tabcont" border="0" cellspacing="0" cellpadding="6" summary="policies">
105 a93e56c5 Matthew Grooms
						<tr>
106 a8590dd6 Colin Fleming
							<td width="16"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_in.gif" width="11" height="11" alt="in" /></td>
107 f8ec8de4 Renato Botelho
							<td><?= gettext("incoming (as seen by firewall)"); ?></td>
108 a93e56c5 Matthew Grooms
						</tr>
109
						<tr>
110
							<td colspan="5" height="4"></td>
111
						</tr>
112
						<tr>
113 a8590dd6 Colin Fleming
							<td><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_out.gif" width="11" height="11" alt="out" /></td>
114 f8ec8de4 Renato Botelho
							<td><?= gettext("outgoing (as seen by firewall)"); ?></td>
115 a93e56c5 Matthew Grooms
						</tr>
116
						<?php else: ?>
117
						<tr>
118
							<td>
119 f8ec8de4 Renato Botelho
								<p><strong><?= gettext("No IPsec security policies."); ?></strong></p>
120 a93e56c5 Matthew Grooms
							</td>
121
						</tr>
122
						<?php endif; ?>
123
					</table>
124
				</div>
125
			</td>
126
		</tr>
127
	</table>
128 2f6cd24f Scott Ullrich
129 a8590dd6 Colin Fleming
<p class="vexpl">
130 8cd558b6 ayvis
<span class="red"><strong><?= gettext("Note:"); ?><br /></strong></span>
131 35c7b0ce Carlos Eduardo Ramos
<?= gettext("You can configure your IPsec"); ?> <a href="vpn_ipsec.php"><?= gettext("here."); ?></a>
132 a8590dd6 Colin Fleming
</p>
133 2f6cd24f Scott Ullrich
134
<?php include("fend.inc"); ?>
135 5b237745 Scott Ullrich
</body>
136
</html>