Projet

Général

Profil

Télécharger (19,6 ko) Statistiques
| Branche: | Tag: | Révision:

univnautes / usr / local / www / vpn_ipsec.php @ 43083402

1
<?php
2
/*
3
	vpn_ipsec.php
4
	part of m0n0wall (http://m0n0.ch/wall)
5

    
6
	Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
7
	Copyright (C) 2008 Shrew Soft Inc
8
	All rights reserved.
9

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

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

    
16
	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

    
20
	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
##|+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
require("guiconfig.inc");
40
require_once("functions.inc");
41
require_once("filter.inc");
42
require_once("shaper.inc");
43
require_once("ipsec.inc");
44
require_once("vpn.inc");
45

    
46
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
$pconfig['enable'] = isset($config['ipsec']['enable']);
56

    
57
if ($_POST) {
58
	if ($_POST['apply']) {
59
		$retval = 0;
60
		$retval = vpn_ipsec_configure();
61
		/* reload the filter in the background */
62
		filter_configure();
63
		$savemsg = get_std_save_message($retval);
64
		if ($retval >= 0) {
65
			if (is_subsystem_dirty('ipsec'))
66
				clear_subsystem_dirty('ipsec');
67
		}
68
	} else if ($_POST['submit']) {
69
		$pconfig = $_POST;
70

    
71
		$config['ipsec']['enable'] = $_POST['enable'] ? true : false;
72

    
73
		write_config();
74

    
75
		$retval = vpn_ipsec_configure();
76
	} else if (isset($_POST['del_x'])) {
77
		/* delete selected p1 entries */
78
		if (is_array($_POST['p1entry']) && count($_POST['p1entry'])) {
79
			foreach ($_POST['p1entry'] as $p1entrydel) {
80
				unset($a_phase1[$p1entrydel]);
81
			}
82
			if (write_config())
83
				mark_subsystem_dirty('ipsec');
84
			header("Location: vpn_ipsec.php");
85
			exit;
86
		}
87
	} else {
88
		/* yuck - IE won't send value attributes for image buttons, while Mozilla does - so we use .x/.y to find move button clicks instead... */
89
		unset($movebtn);
90
		foreach ($_POST as $pn => $pd) {
91
			if (preg_match("/move_(\d+)_x/", $pn, $matches)) {
92
				$movebtn = $matches[1];
93
				break;
94
			}
95
		}
96
		/* move selected p1 entries before this */
97
		if (isset($movebtn) && is_array($_POST['p1entry']) && count($_POST['p1entry'])) {
98
			$a_phase1_new = array();
99

    
100
			/* copy all p1 entries < $movebtn and not selected */
101
			for ($i = 0; $i < $movebtn; $i++) {
102
				if (!in_array($i, $_POST['p1entry']))
103
					$a_phase1_new[] = $a_phase1[$i];
104
			}
105

    
106
			/* copy all selected p1 entries */
107
			for ($i = 0; $i < count($a_phase1); $i++) {
108
				if ($i == $movebtn)
109
					continue;
110
				if (in_array($i, $_POST['p1entry']))
111
					$a_phase1_new[] = $a_phase1[$i];
112
			}
113

    
114
			/* copy $movebtn p1 entry */
115
			if ($movebtn < count($a_phase1))
116
				$a_phase1_new[] = $a_phase1[$movebtn];
117

    
118
			/* copy all p1 entries > $movebtn and not selected */
119
			for ($i = $movebtn+1; $i < count($a_phase1); $i++) {
120
				if (!in_array($i, $_POST['p1entry']))
121
					$a_phase1_new[] = $a_phase1[$i];
122
			}
123
			if (count($a_phase1_new) > 0)
124
				$a_phase1 = $a_phase1_new;
125

    
126
			if (write_config())
127
				mark_subsystem_dirty('ipsec');
128
			header("Location: vpn_ipsec.php");
129
			exit;
130
		}
131
	}
132
}
133

    
134
if (isset($_GET['p1index']) && is_numericint($_GET['p1index']) && isset($a_phase1[$_GET['p1index']])) {
135
	if ($_GET['act'] == "delph1") {
136
		/* remove static route if interface is not WAN */
137
		if ($a_phase1[$_GET['p1index']]['interface'] <> "wan")
138
			mwexec("/sbin/route delete -host {$a_phase1[$_GET['p1index']]['remote-gateway']}");
139

    
140
		/* remove all phase2 entries that match the ikeid */
141
		$ikeid = $a_phase1[$_GET['p1index']]['ikeid'];
142
		foreach ($a_phase2 as $p2index => $ph2tmp)
143
			if ($ph2tmp['ikeid'] == $ikeid) {
144
				unset($a_phase2[$p2index]);
145
			}
146

    
147
		/* remove the phase1 entry */
148
		unset($a_phase1[$_GET['p1index']]);
149
		write_config();
150
		mark_subsystem_dirty('ipsec');
151
	} else if ($_GET['act'] == "delph2") {
152
		/* remove the phase2 entry */
153
		unset($a_phase2[$_GET['p2index']]);
154
		write_config();
155
		mark_subsystem_dirty('ipsec');
156
	} else if ($_GET['act'] == "toggle") {
157
		if (isset($a_phase1[$_GET['p1index']]['disabled']))
158
			unset($a_phase1[$_GET['p1index']]['disabled']);
159
		else
160
			$a_phase1[$_GET['p1index']]['disabled'] = true;
161

    
162
		write_config();
163
		mark_subsystem_dirty('ipsec');
164
	}
165

    
166
	header("Location: vpn_ipsec.php");
167
	exit;
168
}
169

    
170
$pgtitle = array(gettext("VPN"),gettext("IPsec"));
171
$shortcut_section = "ipsec";
172

    
173
include("head.inc");
174

    
175
?>
176

    
177
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
178
<?php include("fbegin.inc"); ?>
179
<form action="vpn_ipsec.php" method="post">
180
<script type="text/javascript" src="/javascript/row_toggle.js"></script>
181
<?php
182
	if ($savemsg)
183
		print_info_box($savemsg);
184
	if ($pconfig['enable'] && is_subsystem_dirty('ipsec'))
185
		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."));
186
?>
187
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="vpn ipsec">
188
	<tr>
189
		<td class="tabnavtbl">
190
<?php
191
			$tab_array = array();
192
			$tab_array[0] = array(gettext("Tunnels"), true, "vpn_ipsec.php");
193
			$tab_array[1] = array(gettext("Mobile clients"), false, "vpn_ipsec_mobile.php");
194
			$tab_array[2] = array(gettext("Pre-Shared Keys"), false, "vpn_ipsec_keys.php");
195
			$tab_array[3] = array(gettext("Advanced Settings"), false, "vpn_ipsec_settings.php");
196
			display_top_tabs($tab_array);
197
?>
198
		</td>
199
	</tr>
200
	<tr>
201
		<td>
202
			<div id="mainarea">
203
				<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
204
					<tr>
205
						<td class="vtable">
206
							<table border="0" cellspacing="2" cellpadding="0" summary="enable">
207
								<tr>
208
									<td>
209
										<input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked=\"checked\"";?> />
210
									</td>
211
									<td>
212
										<strong><?=gettext("Enable IPsec"); ?></strong>
213
									</td>
214
								</tr>
215
							</table>
216
						</td>
217
					</tr>
218
					<tr>
219
						<td>
220
							<input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
221
						</td>
222
					</tr>
223
				</table>
224
				<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0" summary="phase-1 entries">
225
					<tr id="frheader">
226
						<td class="list">&nbsp;</td>
227
						<td class="list">&nbsp;</td>
228
						<td class="listhdrr"><?=gettext("IKE"); ?></td>
229
						<td class="listhdrr"><?=gettext("Remote Gateway"); ?></td>
230
						<td class="listhdrr"><?=gettext("Mode"); ?></td>
231
						<td class="listhdrr"><?=gettext("P1 Protocol"); ?></td>
232
						<td class="listhdrr"><?=gettext("P1 Transforms"); ?></td>
233
						<td class="listhdrr"><?=gettext("P1 Description"); ?></td>
234
						<td class="list">
235
						</td>
236
					</tr>
237
<?php
238
				$i = 0;
239
				foreach ($a_phase1 as $ph1ent):
240
					$iconfn = "pass";
241
					$spans = $spane = "";
242
					if (isset($ph1ent['disabled'])) {
243
						$spans = "<span class=\"gray\">";
244
						$spane = "</span>";
245
						$iconfn .= "_d";
246
					}
247
?>
248
					<tr valign="top" id="fr<?=$i;?>" ondblclick="document.location='vpn_ipsec_phase1.php?p1index=<?=$i;?>'">
249
						<td class="listt" align="center" valign="middle">
250
							<input type="checkbox" id="frc<?=$i;?>" name="p1entry[]" value="<?=$i;?>" onclick="fr_bgcolor('<?=$i;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;" />
251
						</td>
252
						<td class="listt" align="center" valign="middle">
253
							<a href="?p1index=<?=$i;?>&amp;act=toggle"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="11" border="0" title="<?=gettext("click to toggle enabled/disabled status");?>" alt="icon" /></a>
254
						</td>
255
						<td class="listlr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>">
256
							<?=$spans;?>
257
<?php
258
							if (empty($ph1ent['iketype']) || $ph1ent['iketype'] == "ikev1")
259
								echo "V1";
260
							else
261
								echo "V2";
262
?>
263
							<?=$spane;?>
264
						</td>
265
						<td class="listr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>">
266
							<?=$spans;?>
267
<?php
268
							if ($ph1ent['interface']) {
269
								$iflabels = get_configured_interface_with_descr();
270

    
271
								$carplist = get_configured_carp_interface_list();
272
								foreach ($carplist as $cif => $carpip)
273
									$iflabels[$cif] = $carpip." (".get_vip_descr($carpip).")";
274

    
275
								$aliaslist = get_configured_ip_aliases_list();
276
								foreach ($aliaslist as $aliasip => $aliasif)
277
									$iflabels[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")";
278

    
279
								$grouplist = return_gateway_groups_array();
280
								foreach ($grouplist as $name => $group) {
281
									if($group[0]['vip'] <> "")
282
										$vipif = $group[0]['vip'];
283
									else
284
										$vipif = $group[0]['int'];
285
									$iflabels[$name] = "GW Group {$name}";
286
								}
287
								$if = htmlspecialchars($iflabels[$ph1ent['interface']]);
288
							}
289
							else
290
								$if = "WAN";
291

    
292
							if (!isset($ph1ent['mobile']))
293
								echo $if."<br />".$ph1ent['remote-gateway'];
294
							else
295
								echo $if."<br /><strong>" . gettext("Mobile Client") . "</strong>";
296
?>
297
							<?=$spane;?>
298
						</td>
299
						<td class="listr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>">
300
							<?=$spans;?>
301
							<?=$ph1ent['mode'];?>
302
							<?=$spane;?>
303
						</td>
304
						<td class="listr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>">
305
							<?=$spans;?>
306
							<?=$p1_ealgos[$ph1ent['encryption-algorithm']['name']]['name'];?>
307
<?php
308
							if ($ph1ent['encryption-algorithm']['keylen']) {
309
								if ($ph1ent['encryption-algorithm']['keylen']=="auto")
310
									echo " (" . gettext("auto") . ")";
311
								else
312
									echo " ({$ph1ent['encryption-algorithm']['keylen']} " . gettext("bits") . ")";
313
							}
314
?>
315
							<?=$spane;?>
316
						</td>
317
						<td class="listr" onclick="fr_toggle(<?=$i;?>)" id="frd<?=$i;?>">
318
							<?=$spans;?>
319
							<?=$p1_halgos[$ph1ent['hash-algorithm']];?>
320
							<?=$spane;?>
321
						</td>
322
						<td class="listbg" onclick="fr_toggle(<?=$i;?>)">
323
							<?=$spans;?>
324
							<?=htmlspecialchars($ph1ent['descr']);?>&nbsp;
325
							<?=$spane;?>
326
						</td>
327
						<td valign="middle" class="list nowrap">
328
							<table border="0" cellspacing="0" cellpadding="1" summary="icons">
329
								<tr>
330
									<td>
331
										<input onmouseover="fr_insline(<?=$i;?>, true)" onmouseout="fr_insline(<?=$i;?>, false)"
332
											name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif"
333
											title="<?=gettext("move selected entries before this");?>"
334
											type="image" style="height:17;width:17;border:0" />
335
									</td>
336
									<td>
337
										<a href="vpn_ipsec_phase1.php?p1index=<?=$i;?>">
338
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase1 entry"); ?>" width="17" height="17" border="0" alt="edit" />
339
										</a>
340
									</td>
341
								</tr>
342
								<tr>
343
									<td>
344
										<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?"); ?>')">
345
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase1 entry"); ?>" width="17" height="17" border="0" alt="delete" />
346
										</a>
347
									</td>
348
									<td>
349
<?php
350
							if (!isset($ph1ent['mobile'])):
351
?>
352
										<a href="vpn_ipsec_phase1.php?dup=<?=$i;?>">
353
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("copy phase1 entry"); ?>" width="17" height="17" border="0" alt="add" />
354
										</a>
355
<?php
356
							endif;
357
?>
358
									</td>
359
								</tr>
360
							</table>
361
						</td>
362
					</tr>
363
					<tr>
364
						<td class="listt">&nbsp;</td>
365
						<td class="listt">&nbsp;</td>
366
						<td class="listrborder" colspan="6">
367
							<div id="shph2but-<?=$i?>">
368
<?php
369
								$phase2count=0;
370
								foreach ($a_phase2 as $ph2ent) {
371
									if ($ph2ent['ikeid'] != $ph1ent['ikeid'])
372
										continue;
373
									$phase2count++;
374
								}
375
?>
376
								<input type="button" onclick="show_phase2('tdph2-<?=$i?>','shph2but-<?=$i?>')" value="+" /> - <?php printf(gettext("Show %s Phase-2 entries"), $phase2count); ?>
377
							</div>
378
							<div id="tdph2-<?=$i?>" style="display:none">
379
							<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="phase-2 entries">
380
								<tr>
381
									<td class="listhdrr"><?=gettext("Mode"); ?></td>
382
<?php
383
								if(($ph2ent['mode'] == "tunnel") or ($ph2ent['mode'] == "tunnel6")):
384
?>
385
									<td class="listhdrr"><?=gettext("Local Subnet"); ?></td>
386
									<td class="listhdrr"><?=gettext("Remote Subnet"); ?></td>
387
<?php
388
								endif;
389
?>
390
									<td class="listhdrr"><?=gettext("P2 Protocol"); ?></td>
391
									<td class="listhdrr"><?=gettext("P2 Transforms"); ?></td>
392
									<td class="listhdrr"><?=gettext("P2 Auth Methods"); ?></td>
393
									<td class ="list">
394
										<a href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid'];?><?php if (isset($ph1ent['mobile'])) echo "&amp;mobile=true";?>">
395
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase2 entry"); ?>" width="17" height="17" border="0" alt="add" />
396
										</a>
397
									</td>
398
								</tr>
399
<?php
400
								foreach ($a_phase2 as $ph2index => $ph2ent):
401
									if ($ph2ent['ikeid'] != $ph1ent['ikeid'])
402
										continue;
403

    
404
									if (isset( $ph2ent['disabled']) || isset($ph1ent['disabled'])) {
405
										$spans = "<span class=\"gray\">";
406
										$spane = "</span>";
407
									} else
408
										$spans = $spane = "";
409
?>
410
								<tr valign="top" ondblclick="document.location='vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid'];?>'">
411

    
412
									<td class="listlr nowrap">
413
										<?=$spans;?>
414
										<?=$ph2ent['mode'];?>
415
										<?=$spane;?>
416
									</td>
417
<?php
418
									if(($ph2ent['mode'] <> "tunnel") and ($ph2ent['mode'] <> "tunnel6")) {
419
										echo "<td class=\"listr nowrap\">&nbsp;</td><td class=\"listr nowrap\">&nbsp;</td>";
420
									}
421
?>
422
<?php
423
									if(($ph2ent['mode'] == "tunnel") or ($ph2ent['mode'] == "tunnel6")):
424
?>
425
										<td class="listr nowrap">
426
											<?=$spans;?>
427
												<?=ipsec_idinfo_to_text($ph2ent['localid']); ?>
428
											<?=$spane;?>
429
										</td>
430
										<td class="listr nowrap">
431
											<?=$spans;?>
432
												<?=ipsec_idinfo_to_text($ph2ent['remoteid']); ?>
433
											<?=$spane;?>
434
										</td>
435
<?php
436
									endif;
437
?>
438
									<td class="listr nowrap">
439
										<?=$spans;?>
440
										<?php echo $p2_protos[$ph2ent['protocol']]; ?>
441
										<?=$spane;?>
442
									</td>
443
									<td class="listr">
444
										<?=$spans;?>
445
<?php
446
										foreach ($ph2ent['encryption-algorithm-option'] as $k => $ph2ea) {
447
											if ($k)
448
												echo ", ";
449
											echo $p2_ealgos[$ph2ea['name']]['name'];
450
											if ($ph2ea['keylen']) {
451
												if ($ph2ea['keylen']=="auto")
452
													echo " (" . gettext("auto") . ")";
453
												else
454
													echo " ({$ph2ea['keylen']} " . gettext("bits") . ")";
455
											}
456
										}
457
?>
458
										<?=$spane;?>
459
									</td>
460
									<td class="listr nowrap">
461
										<?=$spans;?>
462
<?php
463
										if (!empty($ph2ent['hash-algorithm-option']) && is_array($ph2ent['hash-algorithm-option'])) {
464
											foreach ($ph2ent['hash-algorithm-option'] as $k => $ph2ha) {
465
												if ($k)
466
													echo ", ";
467
												echo $p2_halgos[$ph2ha];
468
											}
469
										}
470
?>
471
										<?=$spane;?>
472
									</td>
473
									<td class="list nowrap">
474
										<a href="vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid'];?>">
475
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase2 entry"); ?>" width="17" height="17" border="0" alt="edit" />
476
										</a>
477
										<a href="vpn_ipsec.php?act=delph2&amp;p1index=<?=$i;?>&amp;p2index=<?=$ph2index;?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase2 entry?"); ?>')">
478
											<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase2 entry"); ?>" width="17" height="17" border="0" alt="delete" />
479
										</a>
480
										<a href="vpn_ipsec_phase2.php?dup=<?=$ph2ent['uniqid'];?>">
481
											<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" />
482
										</a>
483
									</td>
484
								</tr>
485
<?php
486
								endforeach;
487
?>
488
							</table>
489
							</div>
490
						</td>
491
					</tr>
492
<?php
493
					$i++;
494
				endforeach;  // $a_phase1 as $ph1ent
495
?>
496
					<tr>
497
						<td class="list" colspan="8"></td>
498
						<td class="list nowrap" valign="middle">
499
							<table border="0" cellspacing="0" cellpadding="1" summary="edit">
500
								<tr>
501
									<td>
502
	<?php
503
									if ($i == 0):
504
	?>
505
										<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected phase1 entries to end");?>" border="0" alt="move" />
506
	<?php
507
									else:
508
	?>
509
										<input name="move_<?=$i;?>" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" style="width:17;height:17;border:0" title="<?=gettext("move selected phase1 entries to end");?>" />
510
	<?php
511
									endif;
512
	?>
513
									</td>
514
									<td>
515
										<a href="vpn_ipsec_phase1.php">
516
											<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add new phase1");?>" alt="add" />
517
										</a>
518
									</td>
519
								</tr>
520
								<tr>
521
									<td>
522
	<?php
523
									if ($i == 0):
524
	?>
525
										<img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected phase1 entries");?>" border="0" alt="delete" />
526
	<?php
527
									else:
528
	?>
529
										<input name="del" type="image" src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" style="width:17;height:17" title="<?=gettext("delete selected phase1 entries");?>" onclick="return confirm('<?=gettext("Do you really want to delete the selected phase1 entries?");?>')" />
530
	<?php
531
									endif;
532
	?>
533
									</td>
534
								</tr>
535
							</table>
536
						</td>
537
					</tr>
538
					<tr>
539
						<td colspan="8">
540
							<p>
541
								<span class="vexpl">
542
									<span class="red">
543
										<strong><?=gettext("Note"); ?>:<br /></strong>
544
									</span>
545
									<?=gettext("You can check your IPsec status at"); ?> <a href="diag_ipsec.php"><?=gettext("Status:IPsec"); ?></a>.<br />
546
									<?=gettext("IPsec Debug Mode can be enabled at"); ?> <a href="vpn_ipsec_settings.php"><?=gettext("VPN:IPsec:Advanced Settings"); ?></a>.<br />
547
									<?=gettext("IPsec can be set to prefer older SAs at"); ?> <a href="vpn_ipsec_settings.php"><?=gettext("VPN:IPsec:Advanced Settings"); ?></a>.
548
								</span>
549
							</p>
550
						</td>
551
					</tr>
552
				</table>
553
			</div>
554
		</td>
555
	</tr>
556
</table>
557
</form>
558
<?php include("fend.inc"); ?>
559
<script type="text/javascript">
560
//<![CDATA[
561
function show_phase2(id, buttonid) {
562
	document.getElementById(buttonid).innerHTML='';
563
	aodiv = document.getElementById(id);
564
	aodiv.style.display = "block";
565
}
566
//]]>
567
</script>
568
</body>
569
</html>
(236-236/255)