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
<?php
2
/* $Id$ */
3
/*
4
	diag_ipsec_spd.php
5
	Copyright (C) 2004-2009 Scott Ullrich
6
	All rights reserved.
7

    
8
	originially 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-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
require("guiconfig.inc");
47
require("ipsec.inc");
48

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

    
53
$spd = ipsec_dump_spd();
54
?>
55

    
56
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
57
	<?php include("fbegin.inc"); ?>
58
	<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="status ipsec spd">
59
		<tr>
60
			<td>
61
				<?php
62
					$tab_array = array();
63
					$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
					display_top_tabs($tab_array);
68
				?>
69
			</td>
70
		</tr>
71
		<tr>
72
			<td>
73
				<div id="mainarea" style="background:#eeeeee">
74
					<table class="tabcont sortable" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
75
						<?php if (count($spd)): ?>
76
						<tr>
77
							<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
						</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
								<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_<?=$sp['dir'];?>.gif" width="11" height="11" style="margin-top: 2px" alt="direction" />
90
							</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
							<td class="list nowrap">
94
								<?php
95
									$args = "srcid=".rawurlencode($sp['srcid']);
96
									$args .= "&amp;dstid=".rawurlencode($sp['dstid']);
97
									$args .= "&amp;dir=".rawurlencode($sp['dir']);
98
								?>
99
							</td>
100
						</tr>
101
						<?php endforeach; ?>
102
					</table>
103
					<br />
104
					<table class="tabcont" border="0" cellspacing="0" cellpadding="6" summary="policies">
105
						<tr>
106
							<td width="16"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_in.gif" width="11" height="11" alt="in" /></td>
107
							<td><?= gettext("incoming (as seen by firewall)"); ?></td>
108
						</tr>
109
						<tr>
110
							<td colspan="5" height="4"></td>
111
						</tr>
112
						<tr>
113
							<td><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_out.gif" width="11" height="11" alt="out" /></td>
114
							<td><?= gettext("outgoing (as seen by firewall)"); ?></td>
115
						</tr>
116
						<?php else: ?>
117
						<tr>
118
							<td>
119
								<p><strong><?= gettext("No IPsec security policies."); ?></strong></p>
120
							</td>
121
						</tr>
122
						<?php endif; ?>
123
					</table>
124
				</div>
125
			</td>
126
		</tr>
127
	</table>
128

    
129
<p class="vexpl">
130
<span class="red"><strong><?= gettext("Note:"); ?><br /></strong></span>
131
<?= gettext("You can configure your IPsec"); ?> <a href="vpn_ipsec.php"><?= gettext("here."); ?></a>
132
</p>
133

    
134
<?php include("fend.inc"); ?>
135
</body>
136
</html>
(16-16/255)