Project

General

Profile

Download (22.4 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/*
3
	vpn_pptp.php
4
	part of m0n0wall (http://m0n0.ch/wall)
5
	
6
	Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
7
	All rights reserved.
8
	
9
	Redistribution and use in source and binary forms, with or without
10
	modification, are permitted provided that the following conditions are met:
11
	
12
	1. Redistributions of source code must retain the above copyright notice,
13
	   this list of conditions and the following disclaimer.
14
	
15
	2. Redistributions in binary form must reproduce the above copyright
16
	   notice, this list of conditions and the following disclaimer in the
17
	   documentation and/or other materials provided with the distribution.
18
	
19
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
20
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
23
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
	POSSIBILITY OF SUCH DAMAGE.
29
*/
30

    
31
##|+PRIV
32
##|*IDENT=page-vpn-vpnpptp
33
##|*NAME=VPN: VPN PPTP page
34
##|*DESCR=Allow access to the 'VPN: VPN PPTP' page.
35
##|*MATCH=vpn_pptp.php*
36
##|-PRIV
37

    
38
require("guiconfig.inc");
39
require_once("functions.inc");
40
require_once("filter.inc");
41
require_once("shaper.inc");
42
require_once("vpn.inc");
43

    
44
if (!is_array($config['pptpd']['radius'])) {
45
	$config['pptpd']['radius'] = array();
46
}
47
$pptpcfg = &$config['pptpd'];
48

    
49
$pconfig['remoteip'] = $pptpcfg['remoteip'];
50
$pconfig['localip'] = $pptpcfg['localip'];
51
$pconfig['redir'] = $pptpcfg['redir'];
52
$pconfig['mode'] = $pptpcfg['mode'];
53
$pconfig['wins'] = $pptpcfg['wins'];
54
$pconfig['req128'] = isset($pptpcfg['req128']);
55
$pconfig['n_pptp_units'] = $pptpcfg['n_pptp_units'];
56
$pconfig['pptp_dns1'] = $pptpcfg['dns1'];
57
$pconfig['pptp_dns2'] = $pptpcfg['dns2'];
58
$pconfig['radiusenable'] = isset($pptpcfg['radius']['server']['enable']);
59
$pconfig['radiusissueips'] = isset($pptpcfg['radius']['radiusissueips']);
60
$pconfig['radiussecenable'] = isset($pptpcfg['radius']['server2']['enable']);
61
$pconfig['radacct_enable'] = isset($pptpcfg['radius']['accounting']);
62
$pconfig['radiusserver'] = $pptpcfg['radius']['server']['ip'];
63
$pconfig['radiusserverport'] = $pptpcfg['radius']['server']['port'];
64
$pconfig['radiusserveracctport'] = $pptpcfg['radius']['server']['acctport'];
65
$pconfig['radiussecret'] = $pptpcfg['radius']['server']['secret'];
66
$pconfig['radiusserver2'] = $pptpcfg['radius']['server2']['ip'];
67
$pconfig['radiusserver2port'] = $pptpcfg['radius']['server2']['port'];
68
$pconfig['radiusserver2acctport'] = $pptpcfg['radius']['server2']['acctport'];
69
$pconfig['radiussecret2'] = $pptpcfg['radius']['server2']['secret2'];
70
$pconfig['radius_acct_update'] = $pptpcfg['radius']['acct_update'];
71
$pconfig['radius_nasip'] = $pptpcfg['radius']['nasip'];
72

    
73
if ($_POST) {
74

    
75
	unset($input_errors);
76
	$pconfig = $_POST;
77

    
78
	/* input validation */
79
	if ($_POST['mode'] == "server") {
80
		$reqdfields = explode(" ", "localip remoteip");
81
		$reqdfieldsn = array(gettext("Server address"),gettext("Remote start address"));
82
		
83
		if ($_POST['radiusenable']) {
84
			$reqdfields = array_merge($reqdfields, explode(" ", "radiusserver radiussecret"));
85
			$reqdfieldsn = array_merge($reqdfieldsn, 
86
				array(gettext("RADIUS server address"),gettext("RADIUS shared secret")));
87
		}
88
		
89
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
90
		
91
		if (($_POST['localip'] && !is_ipaddr($_POST['localip']))) {
92
			$input_errors[] = gettext("A valid server address must be specified.");
93
		}
94
		if (!is_ipaddr($_POST['remoteip'])) {
95
			$input_errors[] = gettext("A valid remote start address must be specified.");
96
		}
97
		if (($_POST['radiusserver'] && !is_ipaddr($_POST['radiusserver']))) {
98
			$input_errors[] = gettext("A valid RADIUS server address must be specified.");
99
		}
100
		
101
		if (!$input_errors) {	
102
			$subnet_start = ip2ulong($_POST['remoteip']);
103
			$subnet_end = ip2ulong($_POST['remoteip']) + $_POST['n_pptp_units'] - 1;
104
						
105
			if ((ip2ulong($_POST['localip']) >= $subnet_start) && 
106
			    (ip2ulong($_POST['localip']) <= $subnet_end)) {
107
				$input_errors[] = gettext("The specified server address lies in the remote subnet.");	
108
			}
109
			// TODO: Should this check be for any local IP address?
110
			if ($_POST['localip'] == $config['interfaces']['lan']['ipaddr']) {
111
				$input_errors[] = gettext("The specified server address is equal to the LAN interface address.");	
112
			}
113
		}
114
	} else if ($_POST['mode'] == "redir") {
115
		$reqdfields = explode(" ", "redir");
116
		$reqdfieldsn = array(gettext("PPTP redirection target address"));
117
		
118
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
119
		
120
		if (($_POST['redir'] && !is_ipaddr($_POST['redir']))) {
121
			$input_errors[] = gettext("A valid target address must be specified.");
122
		}
123
	} else {
124
		unset($config['pptpd']['mode']);
125
	}
126

    
127
	if (!$input_errors) {
128
		$pptpcfg['remoteip'] = $_POST['remoteip'];
129
		$pptpcfg['redir'] = $_POST['redir'];
130
		$pptpcfg['localip'] = $_POST['localip'];
131
		$pptpcfg['mode'] = $_POST['mode'];
132
		$pptpcfg['wins'] = $_POST['wins'];
133
		$pptpcfg['n_pptp_units'] = $_POST['n_pptp_units'];	
134
		$pptpcfg['radius']['server']['ip'] = $_POST['radiusserver'];
135
		$pptpcfg['radius']['server']['port'] = $_POST['radiusserverport'];
136
		$pptpcfg['radius']['server']['acctport'] = $_POST['radiusserveracctport'];
137
		$pptpcfg['radius']['server']['secret'] = $_POST['radiussecret'];
138
		$pptpcfg['radius']['server2']['ip'] = $_POST['radiusserver2'];
139
		$pptpcfg['radius']['server2']['port'] = $_POST['radiusserver2port'];
140
		$pptpcfg['radius']['server2']['acctport'] = $_POST['radiusserver2acctport'];
141
		$pptpcfg['radius']['server2']['secret2'] = $_POST['radiussecret2'];
142
		$pptpcfg['radius']['nasip'] = $_POST['radius_nasip'];
143
		$pptpcfg['radius']['acct_update'] = $_POST['radius_acct_update'];
144

    
145
 		if ($_POST['pptp_dns1'] == "") 
146
        		unset($pptpcfg['dns1']);
147
		else
148
			$pptpcfg['dns1'] = $_POST['pptp_dns1'];
149

    
150
 		if ($_POST['pptp_dns2'] == "") 
151
        		unset($pptpcfg['dns2']);
152
		else
153
			$pptpcfg['dns2'] = $_POST['pptp_dns2'];
154

    
155
		if($_POST['req128'] == "yes") 
156
			$pptpcfg['req128'] = true;
157
		else
158
			unset($pptpcfg['req128']);
159

    
160
		if($_POST['radiusenable'] == "yes") 
161
			$pptpcfg['radius']['server']['enable'] = true;
162
		else 
163
			unset($pptpcfg['radius']['server']['enable']);
164
			
165
		if($_POST['radiussecenable'] == "yes") 
166
			$pptpcfg['radius']['server']['enable'] = true;
167
		else 
168
			unset($pptpcfg['radius']['server2']['enable']);
169
			
170
		if($_POST['radacct_enable'] == "yes") 
171
			$pptpcfg['radius']['accounting'] = true;
172
		else 
173
			unset($pptpcfg['radius']['accounting']);
174
		
175
		if($_POST['radiusissueips'] == "yes") {
176
			$pptpcfg['radius']['radiusissueips'] = true;
177
		} else
178
			unset($pptpcfg['radius']['radiusissueips']);
179
		
180
		write_config();
181
		
182
		$retval = 0;
183
		$retval = vpn_pptpd_configure();
184
		$savemsg = get_std_save_message($retval);
185
		
186
		filter_configure();
187
	}
188
}
189

    
190
$pgtitle = array(gettext("VPN"),gettext("VPN PPTP"));
191
include("head.inc");
192

    
193
?>
194

    
195
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
196
<?php include("fbegin.inc"); ?>
197
<script language="JavaScript">
198
<!--
199
function get_radio_value(obj)
200
{
201
	for (i = 0; i < obj.length; i++) {
202
		if (obj[i].checked)
203
			return obj[i].value;
204
	}
205
	return null;
206
}
207

    
208
function enable_change(enable_over) {
209
	if ((get_radio_value(document.iform.mode) == "server") || enable_over) {
210
		document.iform.remoteip.disabled = 0;
211
		document.iform.localip.disabled = 0;
212
		document.iform.req128.disabled = 0;
213
		document.iform.radiusenable.disabled = 0;
214
		document.iform.radiusissueips.disabled = 0;
215
		document.iform.wins.disabled = 0;
216
		document.iform.n_pptp_units.disabled = 0;
217
		document.iform.pptp_dns1.disabled = 0;
218
		document.iform.pptp_dns2.disabled = 0;	
219
		
220
		if (document.iform.radiusenable.checked || enable_over) {
221
			document.iform.radiussecenable.disabled = 0;
222
			document.iform.radacct_enable.disabled = 0;
223
			document.iform.radiusserver.disabled = 0;
224
			document.iform.radiusserverport.disabled = 0;
225
			document.iform.radiusserveracctport.disabled = 0;
226
			document.iform.radiussecret.disabled = 0;
227
			document.iform.radius_nasip.disabled = 0;	
228
			document.iform.radius_acct_update.disabled = 0;	
229
			document.iform.radiusissueips.disabled = 0;		
230
			if (document.iform.radiussecenable.checked || enable_over) {
231
				document.iform.radiusserver2.disabled = 0;
232
				document.iform.radiussecret2.disabled = 0;
233
				document.iform.radiusserver2port.disabled = 0;
234
				document.iform.radiusserver2acctport.disabled = 0;
235
			} else {
236
	
237
				document.iform.radiusserver2.disabled = 1;
238
				document.iform.radiussecret2.disabled = 1;
239
				document.iform.radiusserver2port.disabled = 1;
240
				document.iform.radiusserver2acctport.disabled = 1;
241
			}	
242
		} else {
243
			document.iform.radacct_enable.disabled = 1;
244
			document.iform.radiusserver.disabled = 1;
245
			document.iform.radiusserverport.disabled = 1;
246
			document.iform.radiusissueips.disabled = 1;
247
			document.iform.radiusserveracctport.disabled = 1;
248
			document.iform.radiussecret.disabled = 1;
249
			document.iform.radius_nasip.disabled = 1;	
250
			document.iform.radius_acct_update.disabled = 1;	
251
			document.iform.radiusissueips.disabled = 1;
252
		}
253

    
254
	} else {
255
		document.iform.remoteip.disabled = 1;
256
		document.iform.localip.disabled = 1;
257
		document.iform.req128.disabled = 1;
258
		document.iform.n_pptp_units.disabled = 1;
259
		document.iform.pptp_dns1.disabled = 1;
260
		document.iform.pptp_dns2.disabled = 1;
261
		document.iform.radiusenable.disabled = 1;
262
		document.iform.radacct_enable.disabled = 1;
263
		document.iform.radiusserver.disabled = 1;
264
		document.iform.radiusserverport.disabled = 1;
265
		document.iform.radiusissueips.disabled = 1;
266
		document.iform.radiusserveracctport.disabled = 1;
267
		document.iform.radiussecret.disabled = 1;
268
		document.iform.radius_nasip.disabled = 1;	
269
		document.iform.radius_acct_update.disabled = 1;
270
		document.iform.radiussecenable.disabled = 1;
271
		document.iform.radiusserver2.disabled = 1;
272
		document.iform.radiusserver2port.disabled = 1;
273
		document.iform.radiusserver2acctport.disabled = 1;
274
		document.iform.radiussecret2.disabled = 1;	
275
		document.iform.wins.disabled = 1;
276
		document.iform.radiusissueips.disabled = 1;
277
	}
278
	if ((get_radio_value(document.iform.mode) == "redir") || enable_over) {
279
		document.iform.redir.disabled = 0;
280
	} else {
281
		document.iform.redir.disabled = 1;
282
	}
283
}
284
//-->
285
</script>
286
<form action="vpn_pptp.php" method="post" name="iform" id="iform">
287
<?php if ($input_errors) print_input_errors($input_errors); ?>
288
<?php if ($savemsg) print_info_box($savemsg); ?>
289
<table width="100%" border="0" cellpadding="0" cellspacing="0">
290
  <tr><td class="tabnavtbl">
291
<?php
292
	$tab_array = array();
293
	$tab_array[0] = array(gettext("Configuration"), true, "vpn_pptp.php");
294
	$tab_array[1] = array(gettext("Users"), false, "vpn_pptp_users.php");
295
	display_top_tabs($tab_array);
296
?>  
297
  </td></tr>
298
  <tr> 
299
    <td>
300
<div id="mainarea">
301
              <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
302
                <tr> 
303
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
304
                  <td width="78%" class="vtable"> 
305
                    <input name="mode" type="radio" onclick="enable_change(false)" value="off"
306
				  	<?php if (($pconfig['mode'] != "server") && ($pconfig['mode'] != "redir")) echo "checked";?>>
307
                    <?=gettext("Off"); ?></td>
308
                <tr> 
309
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
310
                  <td width="78%" class="vtable">
311

    
312
			<input type="radio" name="mode" value="redir" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "redir") echo "checked" ?>>
313
                    <?=gettext("Redirect incoming PPTP connections to");?>:</td>
314
				<tr>
315
				  <td width="22%" valign="top" class="vncellreq"><?=gettext("PPTP redirection");?></td>
316
                  <td width="78%" class="vtable"> 
317
                    <?=$mandfldhtml;?><input name="redir" type="text" class="formfld unknown" id="redir" size="20" value="<?=htmlspecialchars($pconfig['redir']);?>"> 
318
                    <br>
319
                    <?=gettext("Enter the IP address of a host which will accept incoming " .
320
                    "PPTP connections"); ?>.</td>
321
                <tr> 
322
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
323
                  <td width="78%" class="vtable">
324
			<input type="radio" name="mode" value="server" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "server") echo "checked"; ?>>
325
                    <?=gettext("Enable PPTP server"); ?></td>
326
                </tr>
327
				<tr>
328
					<td width="22%" valign="top" class="vncellreq"><?=gettext("No. PPTP users"); ?></td>
329
					<td width="78%" class="vtable">
330
						<select id="n_pptp_units" name="n_pptp_units">
331
							<?php
332
								$toselect = ($pconfig['n_pptp_units'] > 0) ? $pconfig['n_pptp_units'] : 16;
333
								for($x=1; $x<255; $x++) {
334
									if($x == $toselect)
335
										$SELECTED = " SELECTED";
336
									else
337
										$SELECTED = "";
338
									echo "<option value=\"{$x}\"{$SELECTED}>{$x}</option>\n";
339
								}
340
							?>
341
						</select>
342
						<br><?=gettext("Hint: 10 is TEN pptp clients"); ?>
343
					</td>
344
				</tr>
345
                <tr> 
346
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Server address"); ?></td>
347
                  <td width="78%" class="vtable"> 
348
                    <?=$mandfldhtml;?><input name="localip" type="text" class="formfld unknown" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip']);?>"> 
349
                    <br>
350
                    <?=gettext("Enter the IP address the PPTP server should use on its side " .
351
                    "for all clients"); ?>.</td>
352
                </tr>
353
                <tr> 
354
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Remote address " .
355
                    "range"); ?></td>
356
                  <td width="78%" class="vtable"> 
357
                    <?=$mandfldhtml;?><input name="remoteip" type="text" class="formfld unknown" id="remoteip" size="20" value="<?=htmlspecialchars($pconfig['remoteip']);?>">
358
                    <br>
359
                    <?=gettext("Specify the starting address for the client IP subnet"); ?>.<br>
360
                </tr>
361
                <tr> 
362
                  <td width="22%" valign="top" class="vncell"><?=gettext("PPTP DNS Servers"); ?></td>
363
                  <td width="78%" class="vtable"> 
364
                    <?=$mandfldhtml;?><input name="pptp_dns1" type="text" class="formfld unknown" id="pptp_dns1" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns1']);?>">
365
                    <br>
366
					<input name="pptp_dns2" type="text" class="formfld unknown" id="pptp_dns2" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns2']);?>">
367
                    <br>
368
                   <?=gettext("primary and secondary DNS servers assigned to PPTP clients"); ?><br>
369
                </tr>
370
                <tr> 
371
                  <td width="22%" valign="top" class="vncell"><?=gettext("WINS Server"); ?></td>
372
                  <td width="78%" valign="top" class="vtable">
373
                      <input name="wins" class="formfld unknown" id="wins" size="20" value="<?=htmlspecialchars($pconfig['wins']);?>">
374
                  </td>
375
                </tr>
376
                <tr> 
377
                  <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS"); ?></td>
378
                  <td width="78%" class="vtable"> 
379
                      <input name="radiusenable" type="checkbox" id="radiusenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiusenable']) echo "checked"; ?>>
380
                      <strong><?=gettext("Use a RADIUS server for authentication"); ?></strong><br>
381
                      <?=gettext("When set, all users will be authenticated using " .
382
                      "the RADIUS server specified below. The local user database " .
383
                      "will not be used"); ?>.<br>
384
                      <br>
385
                      <input name="radacct_enable" type="checkbox" id="radacct_enable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radacct_enable']) echo "checked"; ?>>
386
                      <strong><?=gettext("Enable RADIUS accounting"); ?> <br>
387
                      </strong><?=gettext("Sends accounting packets to the RADIUS server"); ?>.<br>
388
			 <br>
389
                      <input name="radiussecenable" type="checkbox" id="radiussecenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiussecenable']) echo "checked"; ?>>
390
                      <strong><?=gettext("Secondary RADIUS server for failover authentication"); ?></strong><br>
391
                      <?=gettext("When set, all requests will go to the secondary server when primary fails"); ?><br>
392
		      <br>
393
                      <input name="radiusissueips" value="yes" type="checkbox" class="formfld" id="radiusissueips"<?php if($pconfig['radiusissueips']) echo " CHECKED"; ?>>
394
		      <strong><?=gettext("RADIUS issued IPs"); ?></strong>
395
                      <br><?=gettext("Issue IP addresses via RADIUS server"); ?>.
396
		      </td>
397
                 </td>
398
                </tr>
399
                <tr> 
400
                  <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS NAS IP"); ?></td>
401
                  <td width="78%" valign="top" class="vtable">
402
                      <input name="radius_nasip" class="formfld unknown" id="radius_nasip" size="20" value="<?=htmlspecialchars($pconfig['radius_nasip']);?>">
403
                  </td>
404
		</tr>
405
                <tr> 
406
                  <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS Accounting Update"); ?></td>
407
                  <td width="78%" valign="top" class="vtable">
408
                      <input name="radius_acct_update" class="formfld unknown" id="radius_acct_update" size="20" value="<?=htmlspecialchars($pconfig['radius_acct_update']);?>">
409
                  </td>
410
		</tr>
411
                <tr> 
412
                  <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS Server"); ?> </td>
413
                  <td width="78%" class="vtable">
414
                      <input name="radiusserver" type="text" class="formfld unknown" id="radiusserver" size="20" value="<?=htmlspecialchars($pconfig['radiusserver']);?>">
415
                      <input name="radiusserverport" type="text" class="formfld unknown" id="radiusserverport" size="4" value="<?=htmlspecialchars($pconfig['radiusserverport']);?>">
416
                      <input name="radiusserveracctport" type="text" class="formfld unknown" id="radiusserveracctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserveracctport']);?>">
417
                      <br>
418
                      <?=gettext("Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server"); ?>.</td>
419
                </tr>
420
                <tr> 
421
                  <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS shared secret"); ?></td>
422
                  <td width="78%" valign="top" class="vtable">
423
                      <input name="radiussecret" type="password" class="formfld pwd" id="radiussecret" size="20" value="<?=htmlspecialchars($pconfig['radiussecret']);?>">
424
                      <br>
425
                      <?=gettext("Enter the shared secret that will be used to authenticate " .
426
                      "to the RADIUS server"); ?>.</td>
427
                </tr>
428
                <tr> 
429
                  <td width="22%" valign="top" class="vncell"><?=gettext("Secondary RADIUS server"); ?> </td>
430
                  <td width="78%" class="vtable">
431
                      <input name="radiusserver2" type="text" class="formfld unknown" id="radiusserver2" size="20" value="<?=htmlspecialchars($pconfig['radiusserver2']);?>">
432
                      <input name="radiusserver2port" type="text" class="formfld unknown" id="radiusserver2port" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2port']);?>">
433
                      <input name="radiusserver2acctport" type="text" class="formfld unknown" id="radiusserver2acctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2acctport']);?>">
434
                      <br>
435
                      <?=gettext("Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server"); ?>.</td>
436
                </tr>
437
                <tr> 
438
                  <td width="22%" valign="top" class="vncell"><?=gettext("Secondary RADIUS shared secret"); ?></td>
439
                  <td width="78%" valign="top" class="vtable">
440
                      <input name="radiussecret2" type="password" class="formfld pwd" id="radiussecret2" size="20" value="<?=htmlspecialchars($pconfig['radiussecret2']);?>">
441
                      <br>
442
                      <?=gettext("Enter the shared secret that will be used to authenticate " .
443
                      "to the secondary RADIUS server"); ?>.</td>
444
                </tr>
445
                <tr> 
446
                  <td height="16" colspan="2" valign="top"></td>
447
                </tr>
448
                <tr> 
449
                  <td width="22%" valign="middle">&nbsp;</td>
450
                  <td width="78%" class="vtable"> 
451
                    <input name="req128" type="checkbox" id="req128" value="yes" <?php if ($pconfig['req128']) echo "checked"; ?>> 
452
                    <strong><?=gettext("Require 128-bit encryption"); ?></strong><br>
453
                    <?=gettext("When set, only 128-bit encryption will be accepted. Otherwise " .
454
                    "40-bit and 56-bit encryption will be accepted as well. Note that " .
455
                    "encryption will always be forced on PPTP connections (i.e. " .
456
                    "unencrypted connections will not be accepted)"); ?>.</td>
457
                </tr>
458
                <tr> 
459
                  <td width="22%" valign="top">&nbsp;</td>
460
                  <td width="78%"> 
461
                    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)"> 
462
                  </td>
463
                </tr>
464
                <tr> 
465
                  <td width="22%" valign="top">&nbsp;</td>
466
                  <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br>
467
                    </strong></span><?=gettext("don't forget to ");?><a href="firewall_rules.php?if=pptp"><?=gettext("add a firewall rule"); ?></a> <?=gettext("to permit ". 
468
                    "traffic from PPTP clients");?>!</span></td>
469
                 </tr>
470
              </table>
471
</div>
472
			</td>
473
	</tr>
474
</table>
475
</form>
476
<script language="JavaScript">
477
<!--
478
enable_change(false);
479
//-->
480
</script>
481
<?php include("fend.inc"); ?>
482
</body>
483
</html>
(218-218/222)