Project

General

Profile

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