1
|
<?php
|
2
|
/*
|
3
|
vpn_ipsec_mobile.php
|
4
|
|
5
|
Copyright (C) 2008 Shrew Soft Inc
|
6
|
All rights reserved.
|
7
|
|
8
|
Redistribution and use in source and binary forms, with or without
|
9
|
modification, are permitted provided that the following conditions are met:
|
10
|
|
11
|
1. Redistributions of source code must retain the above copyright notice,
|
12
|
this list of conditions and the following disclaimer.
|
13
|
|
14
|
2. Redistributions in binary form must reproduce the above copyright
|
15
|
notice, this list of conditions and the following disclaimer in the
|
16
|
documentation and/or other materials provided with the distribution.
|
17
|
|
18
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
19
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
20
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
21
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
22
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
23
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
24
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
25
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
26
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
27
|
POSSIBILITY OF SUCH DAMAGE.
|
28
|
*/
|
29
|
|
30
|
##|+PRIV
|
31
|
##|*IDENT=page-vpn-ipsec-mobile
|
32
|
##|*NAME=VPN: IPsec: Mobile page
|
33
|
##|*DESCR=Allow access to the 'VPN: IPsec: Mobile' page.
|
34
|
##|*MATCH=vpn_ipsec_mobile.php*
|
35
|
##|-PRIV
|
36
|
|
37
|
require("functions.inc");
|
38
|
require("guiconfig.inc");
|
39
|
require_once("ipsec.inc");
|
40
|
require_once("vpn.inc");
|
41
|
|
42
|
if (!is_array($config['ipsec']['phase1']))
|
43
|
$config['ipsec']['phase1'] = array();
|
44
|
|
45
|
$a_phase1 = &$config['ipsec']['phase1'];
|
46
|
|
47
|
if (!is_array($config['ipsec']['client']))
|
48
|
$config['ipsec']['client'] = array();
|
49
|
|
50
|
$a_client = &$config['ipsec']['client'];
|
51
|
|
52
|
if (count($a_client)) {
|
53
|
|
54
|
$pconfig['enable'] = $a_client['enable'];
|
55
|
|
56
|
$pconfig['user_source'] = $a_client['user_source'];
|
57
|
$pconfig['group_source'] = $a_client['group_source'];
|
58
|
|
59
|
$pconfig['pool_address'] = $a_client['pool_address'];
|
60
|
$pconfig['pool_netbits'] = $a_client['pool_netbits'];
|
61
|
$pconfig['net_list'] = $a_client['net_list'];
|
62
|
$pconfig['save_passwd'] = $a_client['save_passwd'];
|
63
|
$pconfig['dns_domain'] = $a_client['dns_domain'];
|
64
|
$pconfig['dns_server1'] = $a_client['dns_server1'];
|
65
|
$pconfig['dns_server2'] = $a_client['dns_server2'];
|
66
|
$pconfig['dns_server3'] = $a_client['dns_server3'];
|
67
|
$pconfig['dns_server4'] = $a_client['dns_server4'];
|
68
|
$pconfig['wins_server1'] = $a_client['wins_server1'];
|
69
|
$pconfig['wins_server2'] = $a_client['wins_server2'];
|
70
|
$pconfig['pfs_group'] = $a_client['pfs_group'];
|
71
|
$pconfig['login_banner'] = $a_client['login_banner'];
|
72
|
|
73
|
if (isset($pconfig['enable']))
|
74
|
$pconfig['enable'] = true;
|
75
|
|
76
|
if ($pconfig['pool_address']&&$pconfig['pool_netbits'])
|
77
|
$pconfig['pool_enable'] = true;
|
78
|
else
|
79
|
$pconfig['pool_netbits'] = 24;
|
80
|
|
81
|
if (isset($pconfig['net_list']))
|
82
|
$pconfig['net_list_enable'] = true;
|
83
|
|
84
|
if (isset($pconfig['save_passwd']))
|
85
|
$pconfig['save_passwd_enable'] = true;
|
86
|
|
87
|
if ($pconfig['dns_domain'])
|
88
|
$pconfig['dns_domain_enable'] = true;
|
89
|
|
90
|
if ($pconfig['dns_server1']||$pconfig['dns_server2']||$pconfig['dns_server3']||$pconfig['dns_server4'])
|
91
|
$pconfig['dns_server_enable'] = true;
|
92
|
|
93
|
if ($pconfig['wins_server1']||$pconfig['wins_server2'])
|
94
|
$pconfig['wins_server_enable'] = true;
|
95
|
|
96
|
if (isset($pconfig['pfs_group']))
|
97
|
$pconfig['pfs_group_enable'] = true;
|
98
|
|
99
|
if ($pconfig['login_banner'])
|
100
|
$pconfig['login_banner_enable'] = true;
|
101
|
}
|
102
|
|
103
|
if ($_POST['create']) {
|
104
|
header("Location: vpn_ipsec_phase1.php?mobile=true");
|
105
|
}
|
106
|
|
107
|
if ($_POST['apply']) {
|
108
|
$retval = 0;
|
109
|
$retval = vpn_ipsec_configure();
|
110
|
$savemsg = get_std_save_message($retval);
|
111
|
if ($retval == 0)
|
112
|
if (is_subsystem_dirty('ipsec'))
|
113
|
clear_subsystem_dirty('ipsec');
|
114
|
}
|
115
|
|
116
|
if ($_POST['submit']) {
|
117
|
|
118
|
unset($input_errors);
|
119
|
$pconfig = $_POST;
|
120
|
|
121
|
/* input consolidation */
|
122
|
|
123
|
|
124
|
|
125
|
/* input validation */
|
126
|
|
127
|
$reqdfields = explode(" ", "user_source group_source");
|
128
|
$reqdfieldsn = array(gettext("User Authentication Source"),gettext("Group Authentication Source"));
|
129
|
|
130
|
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
|
131
|
|
132
|
if ($pconfig['pool_enable'])
|
133
|
if (!is_ipaddr($pconfig['pool_address']))
|
134
|
$input_errors[] = gettext("A valid IP address for 'Virtual Address Pool Network' must be specified.");
|
135
|
|
136
|
if ($pconfig['dns_domain_enable'])
|
137
|
if (!is_domain($pconfig['dns_domain']))
|
138
|
$input_errors[] = gettext("A valid value for 'DNS Default Domain' must be specified.");
|
139
|
|
140
|
if ($pconfig['dns_server_enable']) {
|
141
|
if (!$pconfig['dns_server1'] && !$pconfig['dns_server2'] &&
|
142
|
!$pconfig['dns_server3'] && !$pconfig['dns_server4'] )
|
143
|
$input_errors[] = gettext("At least one DNS server must be specified to enable the DNS Server option.");
|
144
|
if ($pconfig['dns_server1'] && !is_ipaddr($pconfig['dns_server1']))
|
145
|
$input_errors[] = gettext("A valid IP address for 'DNS Server #1' must be specified.");
|
146
|
if ($pconfig['dns_server2'] && !is_ipaddr($pconfig['dns_server2']))
|
147
|
$input_errors[] = gettext("A valid IP address for 'DNS Server #2' must be specified.");
|
148
|
if ($pconfig['dns_server3'] && !is_ipaddr($pconfig['dns_server3']))
|
149
|
$input_errors[] = gettext("A valid IP address for 'DNS Server #3' must be specified.");
|
150
|
if ($pconfig['dns_server4'] && !is_ipaddr($pconfig['dns_server4']))
|
151
|
$input_errors[] = gettext("A valid IP address for 'DNS Server #4' must be specified.");
|
152
|
}
|
153
|
|
154
|
if ($pconfig['wins_server_enable']) {
|
155
|
if (!$pconfig['wins_server1'] && !$pconfig['wins_server2'])
|
156
|
$input_errors[] = gettext("At least one WINS server must be specified to enable the DNS Server option.");
|
157
|
if ($pconfig['wins_server1'] && !is_ipaddr($pconfig['wins_server1']))
|
158
|
$input_errors[] = gettext("A valid IP address for 'WINS Server #1' must be specified.");
|
159
|
if ($pconfig['wins_server2'] && !is_ipaddr($pconfig['wins_server2']))
|
160
|
$input_errors[] = gettext("A valid IP address for 'WINS Server #2' must be specified.");
|
161
|
}
|
162
|
|
163
|
if ($pconfig['login_banner_enable'])
|
164
|
if (!strlen($pconfig['login_banner']))
|
165
|
$input_errors[] = gettext("A valid value for 'Login Banner' must be specified.");
|
166
|
|
167
|
if (!$input_errors) {
|
168
|
$client = array();
|
169
|
|
170
|
if ($pconfig['enable'])
|
171
|
$client['enable'] = true;
|
172
|
|
173
|
$client['user_source'] = $pconfig['user_source'];
|
174
|
$client['group_source'] = $pconfig['group_source'];
|
175
|
|
176
|
if ($pconfig['pool_enable']) {
|
177
|
$client['pool_address'] = $pconfig['pool_address'];
|
178
|
$client['pool_netbits'] = $pconfig['pool_netbits'];
|
179
|
}
|
180
|
|
181
|
if ($pconfig['net_list_enable'])
|
182
|
$client['net_list'] = true;
|
183
|
|
184
|
if ($pconfig['save_passwd_enable'])
|
185
|
$client['save_passwd'] = true;
|
186
|
|
187
|
if ($pconfig['dns_domain_enable'])
|
188
|
$client['dns_domain'] = $pconfig['dns_domain'];
|
189
|
|
190
|
if ($pconfig['dns_server_enable']) {
|
191
|
$client['dns_server1'] = $pconfig['dns_server1'];
|
192
|
$client['dns_server2'] = $pconfig['dns_server2'];
|
193
|
$client['dns_server3'] = $pconfig['dns_server3'];
|
194
|
$client['dns_server4'] = $pconfig['dns_server4'];
|
195
|
}
|
196
|
|
197
|
if ($pconfig['wins_server_enable']) {
|
198
|
$client['wins_server1'] = $pconfig['wins_server1'];
|
199
|
$client['wins_server2'] = $pconfig['wins_server2'];
|
200
|
}
|
201
|
|
202
|
if ($pconfig['pfs_group_enable'])
|
203
|
$client['pfs_group'] = $pconfig['pfs_group'];
|
204
|
|
205
|
if ($pconfig['login_banner_enable'])
|
206
|
$client['login_banner'] = $pconfig['login_banner'];
|
207
|
|
208
|
// $echo "login banner = {$pconfig['login_banner']}";
|
209
|
|
210
|
$a_client = $client;
|
211
|
|
212
|
write_config();
|
213
|
mark_subsystem_dirty('ipsec');
|
214
|
|
215
|
header("Location: vpn_ipsec_mobile.php");
|
216
|
exit;
|
217
|
}
|
218
|
}
|
219
|
|
220
|
$pgtitle = array(gettext("VPN"),gettext("IPsec"),gettext("Mobile"));
|
221
|
$statusurl = "diag_ipsec.php";
|
222
|
$logurl = "diag_logs_ipsec.php";
|
223
|
|
224
|
include("head.inc");
|
225
|
?>
|
226
|
|
227
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
228
|
<?php include("fbegin.inc"); ?>
|
229
|
|
230
|
<script language="JavaScript">
|
231
|
<!--
|
232
|
|
233
|
function pool_change() {
|
234
|
|
235
|
if (document.iform.pool_enable.checked) {
|
236
|
document.iform.pool_address.disabled = 0;
|
237
|
document.iform.pool_netbits.disabled = 0;
|
238
|
} else {
|
239
|
document.iform.pool_address.disabled = 1;
|
240
|
document.iform.pool_netbits.disabled = 1;
|
241
|
}
|
242
|
}
|
243
|
|
244
|
function dns_domain_change() {
|
245
|
|
246
|
if (document.iform.dns_domain_enable.checked)
|
247
|
document.iform.dns_domain.disabled = 0;
|
248
|
else
|
249
|
document.iform.dns_domain.disabled = 1;
|
250
|
}
|
251
|
|
252
|
function dns_server_change() {
|
253
|
|
254
|
if (document.iform.dns_server_enable.checked) {
|
255
|
document.iform.dns_server1.disabled = 0;
|
256
|
document.iform.dns_server2.disabled = 0;
|
257
|
document.iform.dns_server3.disabled = 0;
|
258
|
document.iform.dns_server4.disabled = 0;
|
259
|
} else {
|
260
|
document.iform.dns_server1.disabled = 1;
|
261
|
document.iform.dns_server2.disabled = 1;
|
262
|
document.iform.dns_server3.disabled = 1;
|
263
|
document.iform.dns_server4.disabled = 1;
|
264
|
}
|
265
|
}
|
266
|
|
267
|
function wins_server_change() {
|
268
|
|
269
|
if (document.iform.wins_server_enable.checked) {
|
270
|
document.iform.wins_server1.disabled = 0;
|
271
|
document.iform.wins_server2.disabled = 0;
|
272
|
} else {
|
273
|
document.iform.wins_server1.disabled = 1;
|
274
|
document.iform.wins_server2.disabled = 1;
|
275
|
}
|
276
|
}
|
277
|
|
278
|
function pfs_group_change() {
|
279
|
|
280
|
if (document.iform.pfs_group_enable.checked)
|
281
|
document.iform.pfs_group.disabled = 0;
|
282
|
else
|
283
|
document.iform.pfs_group.disabled = 1;
|
284
|
}
|
285
|
|
286
|
function login_banner_change() {
|
287
|
|
288
|
if (document.iform.login_banner_enable.checked)
|
289
|
document.iform.login_banner.disabled = 0;
|
290
|
else
|
291
|
document.iform.login_banner.disabled = 1;
|
292
|
}
|
293
|
|
294
|
//-->
|
295
|
</script>
|
296
|
|
297
|
<form action="vpn_ipsec_mobile.php" method="post" name="iform" id="iform">
|
298
|
|
299
|
<?php
|
300
|
if ($savemsg)
|
301
|
print_info_box($savemsg);
|
302
|
if (isset($config['ipsec']['enable']) && is_subsystem_dirty('ipsec'))
|
303
|
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."));
|
304
|
foreach ($a_phase1 as $ph1ent)
|
305
|
if (isset($ph1ent['mobile']))
|
306
|
$ph1found = true;
|
307
|
if ($pconfig['enable'] && !$ph1found)
|
308
|
print_info_box_np(gettext("Support for IPsec Mobile clients is enabled but a Phase1 definition was not found") . ".<br>" . gettext("Please click Create to define one."),gettext("create"),gettext("Create Phase1"));
|
309
|
if ($input_errors)
|
310
|
print_input_errors($input_errors);
|
311
|
?>
|
312
|
|
313
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
314
|
<tr>
|
315
|
<td class="tabnavtbl">
|
316
|
<?php
|
317
|
$tab_array = array();
|
318
|
$tab_array[0] = array(gettext("Tunnels"), false, "vpn_ipsec.php");
|
319
|
$tab_array[1] = array(gettext("Mobile clients"), true, "vpn_ipsec_mobile.php");
|
320
|
$tab_array[2] = array(gettext("Pre-shared keys"), false, "vpn_ipsec_keys.php");
|
321
|
display_top_tabs($tab_array);
|
322
|
?>
|
323
|
</td>
|
324
|
</tr>
|
325
|
<tr>
|
326
|
<td id="mainarea">
|
327
|
<div class="tabcont">
|
328
|
<table width="100%" border="0" cellpadding="6" cellspacing="0">
|
329
|
<tr>
|
330
|
<td width="22%" valign="top" class="vncellreq"><?=gettext("IKE Extensions"); ?></td>
|
331
|
<td width="78%" class="vtable">
|
332
|
<table border="0" cellspacing="2" cellpadding="0">
|
333
|
<tr>
|
334
|
<td>
|
335
|
<?php set_checked($pconfig['enable'],$chk); ?>
|
336
|
<input name="enable" type="checkbox" id="enable" value="yes" <?=$chk;?>>
|
337
|
</td>
|
338
|
<td>
|
339
|
<strong><?=gettext("Enable IPsec Mobile Client Support"); ?></strong>
|
340
|
</td>
|
341
|
</tr>
|
342
|
</table>
|
343
|
</td>
|
344
|
</tr>
|
345
|
<tr>
|
346
|
<td colspan="2" class="list" height="12"></td>
|
347
|
</tr>
|
348
|
<tr>
|
349
|
<td colspan="2" valign="top" class="listtopic">
|
350
|
<?=gettext("Extended Authentication (Xauth)"); ?>
|
351
|
</td>
|
352
|
</tr>
|
353
|
<tr>
|
354
|
<td width="22%" valign="top" class="vncellreq"><?=gettext("User Authentication"); ?></td>
|
355
|
<td width="78%" class="vtable">
|
356
|
<?=gettext("Source"); ?>:
|
357
|
<select name="user_source" class="formselect" id="user_source">
|
358
|
<option value="system"><?=gettext("system"); ?></option>
|
359
|
</select>
|
360
|
</td>
|
361
|
</tr>
|
362
|
<tr>
|
363
|
<td width="22%" valign="top" class="vncellreq"><?=gettext("Group Authentication"); ?></td>
|
364
|
<td width="78%" class="vtable">
|
365
|
<?=gettext("Source"); ?>:
|
366
|
<select name="group_source" class="formselect" id="group_source">
|
367
|
<option value="system"><?=gettext("system"); ?></option>
|
368
|
</select>
|
369
|
</td>
|
370
|
</tr>
|
371
|
<tr>
|
372
|
<td colspan="2" class="list" height="12"></td>
|
373
|
</tr>
|
374
|
<tr>
|
375
|
<td colspan="2" valign="top" class="listtopic">
|
376
|
<?=gettext("Client Configuration (mode-cfg)"); ?>
|
377
|
</td>
|
378
|
</tr>
|
379
|
<tr>
|
380
|
<td width="22%" valign="top" class="vncell"><?=gettext("Virtual Address Pool"); ?></td>
|
381
|
<td width="78%" class="vtable">
|
382
|
<table border="0" cellspacing="2" cellpadding="0">
|
383
|
<tr>
|
384
|
<td>
|
385
|
<?php set_checked($pconfig['pool_enable'],$chk); ?>
|
386
|
<input name="pool_enable" type="checkbox" id="pool_enable" value="yes" <?=$chk;?> onClick="pool_change()">
|
387
|
</td>
|
388
|
<td>
|
389
|
<?=gettext("Provide a vitual IP address to clients"); ?><br>
|
390
|
</td>
|
391
|
</tr>
|
392
|
</table>
|
393
|
<table border="0" cellspacing="2" cellpadding="0">
|
394
|
<tr>
|
395
|
<td>
|
396
|
<?=gettext("Network"); ?>:
|
397
|
<input name="pool_address" type="text" class="formfld unknown" id="pool_address" size="20" value="<?=htmlspecialchars($pconfig['pool_address']);?>">
|
398
|
/
|
399
|
<select name="pool_netbits" class="formselect" id="pool_netbits">
|
400
|
<?php for ($i = 32; $i >= 0; $i--): ?>
|
401
|
<option value="<?=$i;?>" <?php if ($i == $pconfig['pool_netbits']) echo "selected"; ?>>
|
402
|
<?=$i;?>
|
403
|
</option>
|
404
|
<?php endfor; ?>
|
405
|
</select>
|
406
|
</td>
|
407
|
</tr>
|
408
|
</table>
|
409
|
</td>
|
410
|
</tr>
|
411
|
<tr>
|
412
|
<td width="22%" valign="top" class="vncell"><?=gettext("Network List"); ?></td>
|
413
|
<td width="78%" class="vtable">
|
414
|
<table border="0" cellspacing="2" cellpadding="0">
|
415
|
<tr>
|
416
|
<td>
|
417
|
<?php set_checked($pconfig['net_list_enable'],$chk); ?>
|
418
|
<input name="net_list_enable" type="checkbox" id="net_list_enable" value="yes" <?=$chk;?>>
|
419
|
</td>
|
420
|
<td>
|
421
|
<?=gettext("Provide a list of accessible networks to clients"); ?><br>
|
422
|
</td>
|
423
|
</tr>
|
424
|
</table>
|
425
|
</td>
|
426
|
</tr>
|
427
|
<tr>
|
428
|
<td width="22%" valign="top" class="vncell"><?=gettext("Save Xauth Password"); ?></td>
|
429
|
<td width="78%" class="vtable">
|
430
|
<table border="0" cellspacing="2" cellpadding="0">
|
431
|
<tr>
|
432
|
<td>
|
433
|
<?php set_checked($pconfig['save_passwd_enable'],$chk); ?>
|
434
|
<input name="save_passwd_enable" type="checkbox" id="save_passwd_enable" value="yes" <?=$chk;?>>
|
435
|
</td>
|
436
|
<td>
|
437
|
<?=gettext("Allow clients to save Xauth passwords (Cisco VPN client only)."); ?><br>
|
438
|
<?=gettext("NOTE: With iPhone clients, this does not work when deployed via the iPhone configuration utility, only by manual entry."); ?><br>
|
439
|
</td>
|
440
|
</tr>
|
441
|
</table>
|
442
|
</td>
|
443
|
</tr>
|
444
|
<tr>
|
445
|
<td width="22%" valign="top" class="vncell"><?=gettext("DNS Default Domain"); ?></td>
|
446
|
<td width="78%" class="vtable">
|
447
|
<table border="0" cellspacing="2" cellpadding="0">
|
448
|
<tr>
|
449
|
<td>
|
450
|
<?php set_checked($pconfig['dns_domain_enable'],$chk); ?>
|
451
|
<input name="dns_domain_enable" type="checkbox" id="dns_domain_enable" value="yes" <?=$chk;?> onClick="dns_domain_change()">
|
452
|
</td>
|
453
|
<td>
|
454
|
<?=gettext("Provide a default domain name to clients"); ?><br>
|
455
|
</td>
|
456
|
</tr>
|
457
|
</table>
|
458
|
<table border="0" cellspacing="2" cellpadding="0">
|
459
|
<tr>
|
460
|
<td>
|
461
|
<input name="dns_domain" type="text" class="formfld unknown" id="dns_domain" size="30" value="<?=htmlspecialchars($pconfig['dns_domain']);?>">
|
462
|
</td>
|
463
|
</tr>
|
464
|
</table>
|
465
|
</td>
|
466
|
</tr>
|
467
|
<tr>
|
468
|
<td width="22%" valign="top" class="vncell"><?=gettext("DNS Servers"); ?></td>
|
469
|
<td width="78%" class="vtable">
|
470
|
<table border="0" cellspacing="2" cellpadding="0">
|
471
|
<tr>
|
472
|
<td>
|
473
|
<?php set_checked($pconfig['dns_server_enable'],$chk); ?>
|
474
|
<input name="dns_server_enable" type="checkbox" id="dns_server_enable" value="yes" <?=$chk;?> onClick="dns_server_change()">
|
475
|
</td>
|
476
|
<td>
|
477
|
<?=gettext("Provide a DNS server list to clients"); ?><br>
|
478
|
</td>
|
479
|
</tr>
|
480
|
</table>
|
481
|
<table border="0" cellspacing="2" cellpadding="0">
|
482
|
<tr>
|
483
|
<td>
|
484
|
<?=gettext("Server"); ?> #1:
|
485
|
<input name="dns_server1" type="text" class="formfld unknown" id="dns_server1" size="20" value="<?=htmlspecialchars($pconfig['dns_server1']);?>">
|
486
|
</td>
|
487
|
</tr>
|
488
|
<tr>
|
489
|
<td>
|
490
|
<?=gettext("Server"); ?> #2:
|
491
|
<input name="dns_server2" type="text" class="formfld unknown" id="dns_server2" size="20" value="<?=htmlspecialchars($pconfig['dns_server2']);?>">
|
492
|
</td>
|
493
|
</tr>
|
494
|
<tr>
|
495
|
<td>
|
496
|
<?=gettext("Server"); ?> #3:
|
497
|
<input name="dns_server3" type="text" class="formfld unknown" id="dns_server3" size="20" value="<?=htmlspecialchars($pconfig['dns_server3']);?>">
|
498
|
</td>
|
499
|
</tr>
|
500
|
<tr>
|
501
|
<td>
|
502
|
<?=gettext("Server"); ?> #4:
|
503
|
<input name="dns_server4" type="text" class="formfld unknown" id="dns_server4" size="20" value="<?=htmlspecialchars($pconfig['dns_server4']);?>">
|
504
|
</td>
|
505
|
</tr>
|
506
|
</table>
|
507
|
</td>
|
508
|
</tr>
|
509
|
<tr>
|
510
|
<td width="22%" valign="top" class="vncell"><?=gettext("WINS Servers"); ?></td>
|
511
|
<td width="78%" class="vtable">
|
512
|
<table border="0" cellspacing="2" cellpadding="0">
|
513
|
<tr>
|
514
|
<td>
|
515
|
<?php set_checked($pconfig['wins_server_enable'],$chk); ?>
|
516
|
<input name="wins_server_enable" type="checkbox" id="wins_server_enable" value="yes" <?=$chk;?> onClick="wins_server_change()">
|
517
|
</td>
|
518
|
<td>
|
519
|
<?=gettext("Provide a WINS server list to clients"); ?><br>
|
520
|
</td>
|
521
|
</tr>
|
522
|
</table>
|
523
|
<table border="0" cellspacing="2" cellpadding="0">
|
524
|
<tr>
|
525
|
<td>
|
526
|
<?=gettext("Server"); ?> #1:
|
527
|
<input name="wins_server1" type="text" class="formfld unknown" id="wins_server1" size="20" value="<?=htmlspecialchars($pconfig['wins_server1']);?>">
|
528
|
</td>
|
529
|
</tr>
|
530
|
<tr>
|
531
|
<td>
|
532
|
<?=gettext("Server"); ?> #2:
|
533
|
<input name="wins_server2" type="text" class="formfld unknown" id="wins_server2" size="20" value="<?=htmlspecialchars($pconfig['wins_server2']);?>">
|
534
|
</td>
|
535
|
</tr>
|
536
|
</table>
|
537
|
</td>
|
538
|
</tr>
|
539
|
<tr>
|
540
|
<td width="22%" valign="top" class="vncell"><?=gettext("Phase2 PFS Group"); ?></td>
|
541
|
<td width="78%" class="vtable">
|
542
|
<table border="0" cellspacing="2" cellpadding="0">
|
543
|
<tr>
|
544
|
<td>
|
545
|
<?php set_checked($pconfig['pfs_group_enable'],$chk); ?>
|
546
|
<input name="pfs_group_enable" type="checkbox" id="pfs_group_enable" value="yes" <?=$chk;?> onClick="pfs_group_change()">
|
547
|
</td>
|
548
|
<td>
|
549
|
<?=gettext("Provide the Phase2 PFS group to clients ( overrides all mobile phase2 settings )"); ?><br>
|
550
|
</td>
|
551
|
</tr>
|
552
|
</table>
|
553
|
<table border="0" cellspacing="2" cellpadding="0">
|
554
|
<tr>
|
555
|
<td>
|
556
|
<?=gettext("Group"); ?>:
|
557
|
<select name="pfs_group" class="formselect" id="pfs_group">
|
558
|
<?php foreach ($p2_pfskeygroups as $keygroup => $keygroupname): ?>
|
559
|
<option value="<?=$keygroup;?>" <?php if ($pconfig['pfs_group'] == $keygroup) echo "selected"; ?>>
|
560
|
<?=htmlspecialchars($keygroupname);?>
|
561
|
</option>
|
562
|
<?php endforeach; ?>
|
563
|
</select>
|
564
|
</td>
|
565
|
</tr>
|
566
|
</table>
|
567
|
</td>
|
568
|
</tr>
|
569
|
<tr>
|
570
|
<td width="22%" valign="top" class="vncell"><?=gettext("Login Banner"); ?></td>
|
571
|
<td width="78%" class="vtable">
|
572
|
<table border="0" cellspacing="2" cellpadding="0">
|
573
|
<tr>
|
574
|
<td>
|
575
|
<?php set_checked($pconfig['login_banner_enable'],$chk); ?>
|
576
|
<input name="login_banner_enable" type="checkbox" id="login_banner_enable" value="yes" <?=$chk;?> onClick="login_banner_change()">
|
577
|
</td>
|
578
|
<td>
|
579
|
<?=gettext("Provide a login banner to clients"); ?><br>
|
580
|
</td>
|
581
|
</tr>
|
582
|
</table>
|
583
|
<table border="0" cellspacing="2" cellpadding="0">
|
584
|
<tr>
|
585
|
<td>
|
586
|
<?php $banner = htmlspecialchars($pconfig['login_banner']); ?>
|
587
|
<textarea name="login_banner" cols="65" rows="7" id="login_banner" class="formpre"><?=htmlspecialchars($banner);?></textarea>
|
588
|
</td>
|
589
|
</tr>
|
590
|
</table>
|
591
|
</td>
|
592
|
</tr>
|
593
|
<tr>
|
594
|
<td width="22%" valign="top"> </td>
|
595
|
<td width="78%">
|
596
|
<input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
|
597
|
</td>
|
598
|
</tr>
|
599
|
</table>
|
600
|
</div>
|
601
|
</td>
|
602
|
</tr>
|
603
|
</table>
|
604
|
</form>
|
605
|
<script language="JavaScript">
|
606
|
pool_change();
|
607
|
dns_domain_change();
|
608
|
dns_server_change();
|
609
|
wins_server_change();
|
610
|
pfs_group_change();
|
611
|
login_banner_change();
|
612
|
//-->
|
613
|
</script>
|
614
|
<?php include("fend.inc"); ?>
|
615
|
</body>
|
616
|
</html>
|
617
|
|
618
|
<?php
|
619
|
|
620
|
/* local utility functions */
|
621
|
|
622
|
function set_checked($var,& $chk) {
|
623
|
if($var)
|
624
|
$chk = 'checked';
|
625
|
else
|
626
|
$chk = '';
|
627
|
}
|
628
|
|
629
|
?>
|
630
|
|