Project

General

Profile

Download (15.9 KB) Statistics
| Branch: | Tag: | Revision:
1 5b237745 Scott Ullrich
<?php
2
/*
3
	vpn_ipsec.php
4 e2411886 Scott Ullrich
	part of m0n0wall (http://m0n0.ch/wall)
5 574a2b47 Scott Ullrich
6 e2411886 Scott Ullrich
	Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
7 a93e56c5 Matthew Grooms
	Copyright (C) 2008 Shrew Soft Inc
8 cfc707f7 Scott Ullrich
	All rights reserved.
9 574a2b47 Scott Ullrich
10 5b237745 Scott Ullrich
	Redistribution and use in source and binary forms, with or without
11
	modification, are permitted provided that the following conditions are met:
12 574a2b47 Scott Ullrich
13 5b237745 Scott Ullrich
	1. Redistributions of source code must retain the above copyright notice,
14
	   this list of conditions and the following disclaimer.
15 574a2b47 Scott Ullrich
16 5b237745 Scott Ullrich
	2. Redistributions in binary form must reproduce the above copyright
17
	   notice, this list of conditions and the following disclaimer in the
18
	   documentation and/or other materials provided with the distribution.
19 574a2b47 Scott Ullrich
20 5b237745 Scott Ullrich
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
24
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
	POSSIBILITY OF SUCH DAMAGE.
30
*/
31
32 6b07c15a Matthew Grooms
##|+PRIV
33
##|*IDENT=page-vpn-ipsec
34
##|*NAME=VPN: IPsec page
35
##|*DESCR=Allow access to the 'VPN: IPsec' page.
36
##|*MATCH=vpn_ipsec.php*
37
##|-PRIV
38
39 5b237745 Scott Ullrich
require("guiconfig.inc");
40 7a927e67 Scott Ullrich
require_once("functions.inc");
41
require_once("filter.inc");
42
require_once("shaper.inc");
43 483e6de8 Scott Ullrich
require_once("ipsec.inc");
44
require_once("vpn.inc");
45 5b237745 Scott Ullrich
46 a93e56c5 Matthew Grooms
if (!is_array($config['ipsec']['phase1']))
47
	$config['ipsec']['phase1'] = array();
48
49
if (!is_array($config['ipsec']['phase2']))
50
	$config['ipsec']['phase2'] = array();
51
52
$a_phase1 = &$config['ipsec']['phase1'];
53
$a_phase2 = &$config['ipsec']['phase2'];
54
55 5b237745 Scott Ullrich
$pconfig['enable'] = isset($config['ipsec']['enable']);
56
57
if ($_POST) {
58
59
	if ($_POST['apply']) {
60
		$retval = 0;
61 3851094f Scott Ullrich
		$retval = vpn_ipsec_configure();
62 04b46591 Ermal Lu?i
		/* reload the filter in the background */
63
		filter_configure();
64 5b237745 Scott Ullrich
		$savemsg = get_std_save_message($retval);
65 d17c7b79 jim-p
		if ($retval >= 0) {
66 a368a026 Ermal Lu?i
			if (is_subsystem_dirty('ipsec'))
67
				clear_subsystem_dirty('ipsec');
68 5b237745 Scott Ullrich
		}
69
	} else if ($_POST['submit']) {
70
		$pconfig = $_POST;
71 574a2b47 Scott Ullrich
72 5b237745 Scott Ullrich
		$config['ipsec']['enable'] = $_POST['enable'] ? true : false;
73 c20acc35 Scott Ullrich
74 5b237745 Scott Ullrich
		write_config();
75 9fad9848 jim-p
76
		$retval = vpn_ipsec_configure();
77 5b237745 Scott Ullrich
	}
78
}
79
80 a93e56c5 Matthew Grooms
if ($_GET['act'] == "delph1")
81
{
82
	if ($a_phase1[$_GET['p1index']]) {
83 6de5d673 Seth Mos
		/* remove static route if interface is not WAN */
84 99bbd213 Matthew Grooms
		if ($a_phase1[$_GET['p1index']]['interface'] <> "wan")
85 fbc8af8f sullrich
			mwexec("/sbin/route delete -host {$a_phase1[$_GET['p1index']]['remote-gateway']}");
86 a93e56c5 Matthew Grooms
87
		/* remove all phase2 entries that match the ikeid */
88
		$ikeid = $a_phase1[$_GET['p1index']]['ikeid'];
89 99bbd213 Matthew Grooms
		foreach ($a_phase2 as $p2index => $ph2tmp)
90 6fd8526b Rafael Abdo
			if ($ph2tmp['ikeid'] == $ikeid) {
91 a93e56c5 Matthew Grooms
				unset($a_phase2[$p2index]);
92 6fd8526b Rafael Abdo
			}
93
94 a93e56c5 Matthew Grooms
		/* remove the phase1 entry */
95
		unset($a_phase1[$_GET['p1index']]);
96 647c7c48 Seth Mos
		vpn_ipsec_configure();
97 a93e56c5 Matthew Grooms
		write_config();
98 72bd8df5 Ermal Lu?i
		filter_configure();
99 a93e56c5 Matthew Grooms
		header("Location: vpn_ipsec.php");
100
		exit;
101
	}
102
}
103
104
if ($_GET['act'] == "delph2")
105
{
106 6fd8526b Rafael Abdo
	if ($a_phase1[$_GET['p1index']] && $a_phase2[$_GET['p2index']]) {
107 a93e56c5 Matthew Grooms
		/* remove the phase2 entry */
108
		unset($a_phase2[$_GET['p2index']]);
109 647c7c48 Seth Mos
		vpn_ipsec_configure();
110 3fdb04a6 Scott Ullrich
		filter_configure();
111 5b237745 Scott Ullrich
		write_config();
112
		header("Location: vpn_ipsec.php");
113
		exit;
114
	}
115
}
116 4df96eff Scott Ullrich
117 108f16bf Carlos Eduardo Ramos
$pgtitle = array(gettext("VPN"),gettext("IPsec"));
118 b32dd0a6 jim-p
$shortcut_section = "ipsec";
119 6deedfde jim-p
120 4df96eff Scott Ullrich
include("head.inc");
121
122 53d4b84d Scott Ullrich
?>
123 422f27c0 Scott Ullrich
124
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
125 5b237745 Scott Ullrich
<?php include("fbegin.inc"); ?>
126
<form action="vpn_ipsec.php" method="post">
127 323d040b Scott Ullrich
<?php
128 a93e56c5 Matthew Grooms
	if ($savemsg)
129
		print_info_box($savemsg);
130 a368a026 Ermal Lu?i
	if ($pconfig['enable'] && is_subsystem_dirty('ipsec'))
131 8cd558b6 ayvis
		print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
132 574a2b47 Scott Ullrich
?>
133 391453a1 Colin Fleming
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="vpn ipsec">
134 a93e56c5 Matthew Grooms
	<tr>
135
		<td class="tabnavtbl">
136
			<?php
137
				$tab_array = array();
138 108f16bf Carlos Eduardo Ramos
				$tab_array[0] = array(gettext("Tunnels"), true, "vpn_ipsec.php");
139
				$tab_array[1] = array(gettext("Mobile clients"), false, "vpn_ipsec_mobile.php");
140 2a2b247b jim-p
				$tab_array[2] = array(gettext("Pre-Shared Keys"), false, "vpn_ipsec_keys.php");
141 71172088 jim-p
				$tab_array[3] = array(gettext("Advanced Settings"), false, "vpn_ipsec_settings.php");
142 a93e56c5 Matthew Grooms
				display_top_tabs($tab_array);
143
			?>
144
		</td>
145
	</tr>
146
	<tr>
147
		<td>
148
			<div id="mainarea">
149 391453a1 Colin Fleming
				<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
150 a93e56c5 Matthew Grooms
					<tr>
151
						<td class="vtable">
152 391453a1 Colin Fleming
							<table border="0" cellspacing="2" cellpadding="0" summary="enable">
153 667725ce Matthew Grooms
								<tr>
154
									<td>
155 391453a1 Colin Fleming
										<input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked=\"checked\"";?> />
156 667725ce Matthew Grooms
									</td>
157
									<td>
158 108f16bf Carlos Eduardo Ramos
										<strong><?=gettext("Enable IPsec"); ?></strong>
159 667725ce Matthew Grooms
									</td>
160
								</tr>
161
							</table>
162 a93e56c5 Matthew Grooms
						</td>
163
					</tr>
164
					<tr>
165
						<td>
166 391453a1 Colin Fleming
							<input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
167 a93e56c5 Matthew Grooms
						</td>
168
					</tr>
169
				</table>
170 391453a1 Colin Fleming
				<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="phase-1 entries">
171 5bba8dfb Scott Ullrich
					<?php
172
						$i = 0;
173
						foreach ($a_phase1 as $ph1ent) {
174
							if (isset( $ph1ent['disabled'])) {
175
								$spans = "<span class=\"gray\">";
176
								$spane = "</span>";
177
							}
178
							else
179
								$spans = $spane = "";
180 96162327 Scott Ullrich
						
181
						show_ipsec_header($ph1ent);
182 4494cf6a Chris Buechler
						$counter++; // used to determine if we need to output header manually (no records exist)
183 96162327 Scott Ullrich
					?>					
184 a0d4c5da Matthew Grooms
					<tr valign="top" ondblclick="document.location='vpn_ipsec_phase1.php?p1index=<?=$i;?>'">
185
						<td class="listlr">
186 20452c68 Ermal
							<?=$spans;?>
187 e8177bbb Ermal
							<?php	if (empty($ph1ent['iketype']) || $ph1ent['iketype'] == "ikev1")
188 20452c68 Ermal
									echo "V1";
189
								else
190
									echo "V2";
191
							?>
192
							<?=$spane;?>
193
						</td>
194
						<td class="listr">
195 a93e56c5 Matthew Grooms
							<?=$spans;?>
196
							<?php
197
								if ($ph1ent['interface']) {
198
									$iflabels = get_configured_interface_with_descr();
199 6dbffeda smos
200 abcb2bed Ermal Lu?i
									$carplist = get_configured_carp_interface_list();
201
									foreach ($carplist as $cif => $carpip)
202 25f6730a Pierre POMES
										$iflabels[$cif] = $carpip." (".get_vip_descr($carpip).")";
203 6dbffeda smos
204 25f6730a Pierre POMES
									$aliaslist = get_configured_ip_aliases_list();
205
									foreach ($aliaslist as $aliasip => $aliasif)
206
										$iflabels[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")";
207 6dbffeda smos
208
									$grouplist = return_gateway_groups_array();
209
									foreach ($grouplist as $name => $group) {
210
										if($group[0]['vip'] <> "")
211
											$vipif = $group[0]['vip'];
212
										else
213
											$vipif = $group[0]['int'];
214
										$iflabels[$name] = "GW Group {$name}";
215
									}
216 a93e56c5 Matthew Grooms
									$if = htmlspecialchars($iflabels[$ph1ent['interface']]);
217
								}
218
								else
219
									$if = "WAN";
220
221 3462a529 Matthew Grooms
								if (!isset($ph1ent['mobile']))
222 8cd558b6 ayvis
									echo $if."<br />".$ph1ent['remote-gateway'];
223 3462a529 Matthew Grooms
								else
224 8cd558b6 ayvis
									echo $if."<br /><strong>" . gettext("Mobile Client") . "</strong>";
225 a93e56c5 Matthew Grooms
							?>
226
							<?=$spane;?>
227
						</td>
228 a0d4c5da Matthew Grooms
						<td class="listr">
229 a93e56c5 Matthew Grooms
							<?=$spans;?>
230
							<?=$ph1ent['mode'];?>
231
							<?=$spane;?>
232
						</td>
233 a0d4c5da Matthew Grooms
						<td class="listr">
234 a93e56c5 Matthew Grooms
							<?=$spans;?>
235
							<?=$p1_ealgos[$ph1ent['encryption-algorithm']['name']]['name'];?>
236
							<?php
237
								if ($ph1ent['encryption-algorithm']['keylen']) {
238
									if ($ph1ent['encryption-algorithm']['keylen']=="auto")
239 108f16bf Carlos Eduardo Ramos
										echo " (" . gettext("auto") . ")";
240 a93e56c5 Matthew Grooms
									else
241 108f16bf Carlos Eduardo Ramos
										echo " ({$ph1ent['encryption-algorithm']['keylen']} " . gettext("bits") . ")";
242 a93e56c5 Matthew Grooms
								}
243
							?>
244
							<?=$spane;?>
245
						</td>
246 a0d4c5da Matthew Grooms
						<td class="listr">
247 a93e56c5 Matthew Grooms
							<?=$spans;?>
248
							<?=$p1_halgos[$ph1ent['hash-algorithm']];?>
249
							<?=$spane;?>
250
						</td>
251 b9056c39 Scott Ullrich
						<td class="listbg">
252 a93e56c5 Matthew Grooms
							<?=$spans;?>
253 b9056c39 Scott Ullrich
							<?=htmlspecialchars($ph1ent['descr']);?>&nbsp;
254 a93e56c5 Matthew Grooms
							<?=$spane;?>
255
						</td>
256 391453a1 Colin Fleming
						<td valign="middle" class="list nowrap">
257
							<table border="0" cellspacing="0" cellpadding="1" summary="icons">
258 a93e56c5 Matthew Grooms
								<tr>
259
									<td>
260
										<a href="vpn_ipsec_phase1.php?p1index=<?=$i;?>">
261 391453a1 Colin Fleming
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase1 entry"); ?>" width="17" height="17" border="0" alt="edit" />
262 a93e56c5 Matthew Grooms
										</a>
263
									</td>
264
									<td>
265 391453a1 Colin Fleming
										<a href="vpn_ipsec.php?act=delph1&amp;p1index=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase1 and all associated phase2 entries?"); ?>')">
266
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase1 entry"); ?>" width="17" height="17" border="0" alt="delete" />
267 a93e56c5 Matthew Grooms
										</a>
268
									</td>
269
								</tr>
270 fce61eda Matthew Grooms
								<?php if (!isset($ph1ent['mobile'])): ?>
271 a93e56c5 Matthew Grooms
								<tr>
272
									<td>
273
									</td>
274
									<td>
275
										<a href="vpn_ipsec_phase1.php?dup=<?=$i;?>">
276 391453a1 Colin Fleming
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("copy phase1 entry"); ?>" width="17" height="17" border="0" alt="add" />
277 a93e56c5 Matthew Grooms
										</a>
278
									</td>
279
								</tr>
280 fce61eda Matthew Grooms
								<?php endif; ?>
281 a93e56c5 Matthew Grooms
							</table>
282
						</td>
283
					</tr>
284
					<tr>
285 cbf1f885 jim-p
						<td class="listrborder" colspan="6">
286 0a95b653 Scott Ullrich
							<div id="shph2but-<?=$i?>">
287 e1b74950 Scott Ullrich
								<?php
288
									$phase2count=0;
289 b2a189a8 Scott Ullrich
									foreach ($a_phase2 as $ph2ent) {
290 c82c89ac Scott Ullrich
										if ($ph2ent['ikeid'] != $ph1ent['ikeid']) 
291 b2a189a8 Scott Ullrich
											continue;
292
										if (isset( $ph2ent['disabled']) || isset($ph1ent['disabled'])) 
293
											continue;
294 e1b74950 Scott Ullrich
										$phase2count++;
295 b2a189a8 Scott Ullrich
									}
296 e1b74950 Scott Ullrich
								?>								
297 391453a1 Colin Fleming
								<input type="button" onclick="show_phase2('tdph2-<?=$i?>','shph2but-<?=$i?>')" value="+" /> - <?php printf(gettext("Show %s Phase-2 entries"), $phase2count); ?>
298 0a95b653 Scott Ullrich
							</div>
299 391453a1 Colin Fleming
							<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" id="tdph2-<?=$i?>" style="display:none" summary="phase-2 entries">
300 a93e56c5 Matthew Grooms
								<tr>
301 108f16bf Carlos Eduardo Ramos
									<td class="listhdrr"><?=gettext("Mode"); ?></td>
302 1778480d Seth Mos
									<?php if(($ph2ent['mode'] == "tunnel") or ($ph2ent['mode'] == "tunnel6")): ?>
303 108f16bf Carlos Eduardo Ramos
									<td class="listhdrr"><?=gettext("Local Subnet"); ?></td>
304
									<td class="listhdrr"><?=gettext("Remote Subnet"); ?></td>
305 4b96b367 mgrooms
									<?php endif; ?>
306 108f16bf Carlos Eduardo Ramos
									<td class="listhdrr"><?=gettext("P2 Protocol"); ?></td>
307
									<td class="listhdrr"><?=gettext("P2 Transforms"); ?></td>
308
									<td class="listhdrr"><?=gettext("P2 Auth Methods"); ?></td>
309 a93e56c5 Matthew Grooms
									<td class ="list">
310 391453a1 Colin Fleming
										<a href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid'];?><?php if (isset($ph1ent['mobile'])) echo "&amp;mobile=true";?>">
311
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase2 entry"); ?>" width="17" height="17" border="0" alt="add" />
312 a93e56c5 Matthew Grooms
										</a>
313
									</td>
314
								</tr>
315
								<?php
316
									$j = 0;
317
									foreach ($a_phase2 as $ph2ent) {
318
										if ($ph2ent['ikeid'] != $ph1ent['ikeid']) {
319
											$j++;
320
											continue;
321
										}
322
323
										if (isset( $ph2ent['disabled']) || isset($ph1ent['disabled'])) {
324
											$spans = "<span class=\"gray\">";
325
											$spane = "</span>";
326
										}
327
										else
328
											$spans = $spane = "";
329
								?>
330 4da0e32a Seth Mos
								<tr valign="top" ondblclick="document.location='vpn_ipsec_phase2.php?p2index=<?=$j;?>'">
331 3462a529 Matthew Grooms
332 391453a1 Colin Fleming
									<td class="listlr nowrap">
333 4b96b367 mgrooms
										<?=$spans;?>
334
											<?=$ph2ent['mode'];?>
335
										<?=$spane;?>
336
									</td>
337 c443bb14 Scott Ullrich
									<?php 
338 1778480d Seth Mos
										if(($ph2ent['mode'] <> "tunnel") and ($ph2ent['mode'] <> "tunnel6")) {
339 391453a1 Colin Fleming
											echo "<td class=\"listr nowrap\">&nbsp;</td><td class=\"listr nowrap\">&nbsp;</td>";
340 c443bb14 Scott Ullrich
										} 
341
									?>
342 1778480d Seth Mos
									<?php if(($ph2ent['mode'] == "tunnel") or ($ph2ent['mode'] == "tunnel6")): ?>
343 391453a1 Colin Fleming
									<td class="listr nowrap">
344 a93e56c5 Matthew Grooms
										<?=$spans;?>
345 3462a529 Matthew Grooms
											<?=ipsec_idinfo_to_text($ph2ent['localid']); ?>
346 a93e56c5 Matthew Grooms
										<?=$spane;?>
347
									</td>
348 391453a1 Colin Fleming
									<td class="listr nowrap">
349 a93e56c5 Matthew Grooms
										<?=$spans;?>
350 3462a529 Matthew Grooms
											<?=ipsec_idinfo_to_text($ph2ent['remoteid']); ?>
351 a93e56c5 Matthew Grooms
										<?=$spane;?>
352
									</td>
353 4b96b367 mgrooms
									<?php endif; ?>
354 391453a1 Colin Fleming
									<td class="listr nowrap">
355 a93e56c5 Matthew Grooms
										<?=$spans;?>
356 3462a529 Matthew Grooms
											<?php echo $p2_protos[$ph2ent['protocol']];	?>
357 a93e56c5 Matthew Grooms
										<?=$spane;?>
358
									</td>
359 a0d4c5da Matthew Grooms
									<td class="listr">
360 a93e56c5 Matthew Grooms
										<?=$spans;?>
361
										<?php
362
											$k = 0;
363
											foreach ($ph2ent['encryption-algorithm-option'] as $ph2ea) {
364
												if ($k++)
365
													echo ", ";
366
												echo $p2_ealgos[$ph2ea['name']]['name'];
367
												if ($ph2ea['keylen']) {
368
													if ($ph2ea['keylen']=="auto")
369 108f16bf Carlos Eduardo Ramos
														echo " (" . gettext("auto") . ")";
370 a93e56c5 Matthew Grooms
													else
371 108f16bf Carlos Eduardo Ramos
														echo " ({$ph2ea['keylen']} " . gettext("bits") . ")";
372 a93e56c5 Matthew Grooms
												}
373
											}
374
										?>
375
										<?=$spane;?>
376
									</td>
377 391453a1 Colin Fleming
									<td class="listr nowrap">
378 a93e56c5 Matthew Grooms
										<?=$spans;?>
379
										<?php
380
											$k = 0;
381
											foreach ($ph2ent['hash-algorithm-option'] as $ph2ha) {
382
												if ($k++)
383
													echo ", ";
384
												echo $p2_halgos[$ph2ha];
385
											}
386
										?>
387
										<?=$spane;?>
388
									</td>
389 391453a1 Colin Fleming
									<td class="list nowrap">
390 a93e56c5 Matthew Grooms
										<a href="vpn_ipsec_phase2.php?p2index=<?=$j;?>">
391 391453a1 Colin Fleming
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase2 entry"); ?>" width="17" height="17" border="0" alt="edit" />
392 a93e56c5 Matthew Grooms
										</a>
393 391453a1 Colin Fleming
										<a href="vpn_ipsec.php?act=delph2&amp;p1index=<?=$i;?>&amp;p2index=<?=$j;?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase2 entry?"); ?>')">
394
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase2 entry"); ?>" width="17" height="17" border="0" alt="delete" />
395 a93e56c5 Matthew Grooms
										</a>
396 c8ff68a4 jim-p
										<a href="vpn_ipsec_phase2.php?dup=<?=$j;?>">
397 391453a1 Colin Fleming
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new Phase 2 based on this one"); ?>" width="17" height="17" border="0" alt="add" />
398 c8ff68a4 jim-p
										</a>
399 a93e56c5 Matthew Grooms
									</td>
400
								</tr>
401 3462a529 Matthew Grooms
402 a93e56c5 Matthew Grooms
								<?php
403
										$j++;
404
									}
405
								?>
406
							</table>
407
						</td>
408
					</tr>
409 0a95b653 Scott Ullrich
					<tr>
410
						<td>
411
							&nbsp;
412
						</td>
413
					</tr>
414 a93e56c5 Matthew Grooms
					<?php
415
							$i++;
416
						}
417 96162327 Scott Ullrich
					if(!$counter)
418 83221d3b sullrich
						show_ipsec_header($ph1ent);
419 5b237745 Scott Ullrich
					?>
420 a93e56c5 Matthew Grooms
					<tr>
421 cbf1f885 jim-p
						<td class="list" colspan="6"></td>
422 a93e56c5 Matthew Grooms
						<td class="list">
423 391453a1 Colin Fleming
							<table border="0" cellspacing="0" cellpadding="1" summary="add">
424 a93e56c5 Matthew Grooms
								<tr>
425
									<td width="17"></td>
426
									<td>
427
										<a href="vpn_ipsec_phase1.php">
428 391453a1 Colin Fleming
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase1 entry"); ?>" width="17" height="17" border="0" alt="add" />
429 a93e56c5 Matthew Grooms
										</a>
430
									</td>
431
								</tr>
432
							</table>
433 391453a1 Colin Fleming
						</td>
434 a93e56c5 Matthew Grooms
					</tr>
435
					<tr>
436 cbf1f885 jim-p
						<td colspan="7">
437 a93e56c5 Matthew Grooms
							<p>
438
								<span class="vexpl">
439
									<span class="red">
440 8cd558b6 ayvis
										<strong><?=gettext("Note"); ?>:<br /></strong>
441 a93e56c5 Matthew Grooms
									</span>
442 8cd558b6 ayvis
								<?=gettext("You can check your IPsec status at"); ?> <a href="diag_ipsec.php"><?=gettext("Status:IPsec"); ?></a>.<br />
443 d2ec82af Colin Fleming
									<?=gettext("IPsec Debug Mode can be enabled at"); ?> <a href="vpn_ipsec_settings.php"><?=gettext("VPN:IPsec:Advanced Settings"); ?></a>.<br />
444
									<?=gettext("IPsec can be set to prefer older SAs at"); ?> <a href="vpn_ipsec_settings.php"><?=gettext("VPN:IPsec:Advanced Settings"); ?></a>.
445 a93e56c5 Matthew Grooms
								</span>
446
							</p>
447
						</td>
448
					</tr>
449
				</table>
450
			</div>
451
		</td>
452 5b237745 Scott Ullrich
	</tr>
453
</table>
454
</form>
455
<?php include("fend.inc"); ?>
456 0a95b653 Scott Ullrich
<script type="text/javascript">
457 391453a1 Colin Fleming
//<![CDATA[
458 0a95b653 Scott Ullrich
function show_phase2(id, buttonid) {
459
	document.getElementById(buttonid).innerHTML='';
460
	aodiv = document.getElementById(id);
461
	aodiv.style.display = "block";
462
}
463 391453a1 Colin Fleming
//]]>
464 0a95b653 Scott Ullrich
</script>
465 323d040b Scott Ullrich
</body>
466
</html>
467 96162327 Scott Ullrich
468
<?php
469
470 afcda0d0 sullrich
function show_ipsec_header($ph1ent) {
471
	global $g;
472 83221d3b sullrich
	if (isset($ph1ent['mobile'])) 
473
		$mobile = "&mobile=true";
474 e46616a7 Erik Fonnesbeck
	?>
475 96162327 Scott Ullrich
	<tr>
476 20452c68 Ermal
		<td class="listhdrr"><?=gettext("IKE"); ?></td>
477 108f16bf Carlos Eduardo Ramos
		<td class="listhdrr"><?=gettext("Remote Gateway"); ?></td>
478
		<td class="listhdrr"><?=gettext("Mode"); ?></td>
479
		<td class="listhdrr"><?=gettext("P1 Protocol"); ?></td>
480
		<td class="listhdrr"><?=gettext("P1 Transforms"); ?></td>
481
		<td class="listhdrr"><?=gettext("P1 Description"); ?></td>
482 96162327 Scott Ullrich
		<td class ="list">
483
		</td>
484
	</tr>
485
486 e46616a7 Erik Fonnesbeck
<?php
487 96162327 Scott Ullrich
	
488
}
489
490 04831121 Bill Marquette
?>