Project

General

Profile

Download (4.21 KB) Statistics
| Branch: | Tag: | Revision:

univnautes / usr / local / www / diag_ipsec_sad.php @ a1b66bec

1
<?php
2
/* $Id$ */
3
/*
4
	diag_ipsec_sad.php
5
	Copyright (C) 2004-2009 Scott Ullrich
6
	All rights reserved.
7

    
8
	originally part of m0n0wall (http://m0n0.ch/wall)
9
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
10
	All rights reserved.
11

    
12
	Redistribution and use in source and binary forms, with or without
13
	modification, are permitted provided that the following conditions are met:
14

    
15
	1. Redistributions of source code must retain the above copyright notice,
16
	   this list of conditions and the following disclaimer.
17

    
18
	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

    
22
	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
/*
35
	pfSense_BUILDER_BINARIES:	/sbin/setkey
36
	pfSense_MODULE:	ipsec
37
*/
38

    
39
##|+PRIV
40
##|*IDENT=page-status-ipsec-sad
41
##|*NAME=Status: IPsec: SAD page
42
##|*DESCR=Allow access to the 'Status: IPsec: SAD' page.
43
##|*MATCH=diag_ipsec_sad.php*
44
##|-PRIV
45

    
46
require("guiconfig.inc");
47
require("ipsec.inc");
48

    
49
$pgtitle = array(gettext("Status"),gettext("IPsec"),gettext("SAD"));
50
$shortcut_section = "ipsec";
51
include("head.inc");
52

    
53
$sad = ipsec_dump_sad();
54

    
55
?>
56

    
57
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
58
	<?php include("fbegin.inc"); ?>
59
	<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="status ipsec sad">
60
		<tr>
61
			<td>
62
				<?php
63
					$tab_array = array();
64
					$tab_array[0] = array(gettext("Overview"), false, "diag_ipsec.php");
65
					$tab_array[1] = array(gettext("Leases"), false, "diag_ipsec_leases.php");
66
					$tab_array[2] = array(gettext("SAD"), true, "diag_ipsec_sad.php");
67
					$tab_array[3] = array(gettext("SPD"), false, "diag_ipsec_spd.php");
68
					$tab_array[4] = array(gettext("Logs"), false, "diag_logs_ipsec.php");
69
					display_top_tabs($tab_array);
70
				?>
71
			</td>
72
		</tr>
73
		<tr>
74
			<td>
75
				<div id="mainarea">
76
					<table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
77
						<?php if (count($sad)): ?>
78
						<tr>
79
							<td class="listhdrr nowrap"><?=gettext("Source");?></td>
80
							<td class="listhdrr nowrap"><?=gettext("Destination");?></td>
81
							<td class="listhdrr nowrap"><?=gettext("Protocol");?></td>
82
							<td class="listhdrr nowrap"><?=gettext("SPI");?></td>
83
							<td class="listhdrr nowrap"><?=gettext("Enc. alg.");?></td>
84
							<td class="listhdr nowrap"><?=gettext("Auth. alg.");?></td>
85
							<td class="listhdr nowrap"><?=gettext("Data");?></td>
86
							<td class="list nowrap"></td>
87
						</tr>
88
						<?php foreach ($sad as $sa): ?>
89
						<tr>
90
							<td class="listlr"><?=htmlspecialchars($sa['src']);?></td>
91
							<td class="listr"><?=htmlspecialchars($sa['dst']);?></td>
92
							<td class="listr"><?=htmlspecialchars(strtoupper($sa['proto']));?></td>
93
							<td class="listr"><?=htmlspecialchars($sa['spi']);?></td>
94
							<td class="listr"><?=htmlspecialchars($sa['ealgo']);?></td>
95
							<td class="listr"><?=htmlspecialchars($sa['aalgo']);?></td>
96
							<td class="listr"><?=htmlspecialchars($sa['data']);?></td>
97
							<td class="list nowrap">
98
							</td>
99
						</tr>
100
						<?php endforeach; ?>
101
						<?php else: ?>
102
						<tr>
103
							<td>
104
								<p><strong><?=gettext("No IPsec security associations.");?></strong></p>
105
							</td>
106
						</tr>
107
						<?php endif; ?>
108
					</table>
109
				</div>
110
			</td>
111
		</tr>
112
	</table>
113

    
114
<p class="vexpl">
115
<span class="red"><strong><?=gettext("Note:");?><br /></strong></span>
116
<?=gettext("You can configure your IPsec");?> <a href="vpn_ipsec.php"><?=gettext("here.");?></a>
117
</p>
118

    
119
<?php include("fend.inc"); ?>
120
</body>
121
</html>
(16-16/256)