Project

General

Profile

Download (22.2 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

    
39
require("guiconfig.inc");
40

    
41
if (!is_array($config['pptpd']['radius'])) {
42
	$config['pptpd']['radius'] = array();
43
}
44
$pptpcfg = &$config['pptpd'];
45

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

    
71
if ($_POST) {
72

    
73
	unset($input_errors);
74
	$pconfig = $_POST;
75

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

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

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

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

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

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

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

    
192
?>
193

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

    
207
function enable_change(enable_over) {
208
	if ((get_radio_value(document.iform.mode) == "server") || enable_over) {
209
		document.iform.remoteip.disabled = 0;
210
		document.iform.localip.disabled = 0;
211
		document.iform.req128.disabled = 0;
212
		document.iform.radiusenable.disabled = 0;
213
		document.iform.radiusissueips.disabled = 0;
214
		document.iform.wins.disabled = 0;
215
		document.iform.n_pptp_units.disabled = 0;
216
		document.iform.pptp_subnet.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_subnet.disabled = 1;	
260
		document.iform.pptp_dns1.disabled = 1;
261
		document.iform.pptp_dns2.disabled = 1;
262
		document.iform.radiusenable.disabled = 1;
263
		document.iform.radacct_enable.disabled = 1;
264
		document.iform.radiusserver.disabled = 1;
265
		document.iform.radiusserverport.disabled = 1;
266
		document.iform.radiusissueips.disabled = 1;
267
		document.iform.radiusserveracctport.disabled = 1;
268
		document.iform.radiussecret.disabled = 1;
269
		document.iform.radius_nasip.disabled = 1;	
270
		document.iform.radius_acct_update.disabled = 1;
271
		document.iform.radiussecenable.disabled = 1;
272
		document.iform.radiusserver2.disabled = 1;
273
		document.iform.radiusserver2port.disabled = 1;
274
		document.iform.radiusserver2acctport.disabled = 1;
275
		document.iform.radiussecret2.disabled = 1;	
276
		document.iform.wins.disabled = 1;
277
		document.iform.radiusissueips.disabled = 1;
278
	}
279
	if ((get_radio_value(document.iform.mode) == "redir") || enable_over) {
280
		document.iform.redir.disabled = 0;
281
	} else {
282
		document.iform.redir.disabled = 1;
283
	}
284
}
285
//-->
286
</script>
287
<form action="vpn_pptp.php" method="post" name="iform" id="iform">
288
<?php if ($input_errors) print_input_errors($input_errors); ?>
289
<?php if ($savemsg) print_info_box($savemsg); ?>
290
<table width="100%" border="0" cellpadding="0" cellspacing="0">
291
  <tr><td class="tabnavtbl">
292
<?php
293
	$tab_array = array();
294
	$tab_array[0] = array("Configuration", true, "vpn_pptp.php");
295
	$tab_array[1] = array("Users", false, "vpn_pptp_users.php");
296
	display_top_tabs($tab_array);
297
?>  
298
  </td></tr>
299
  <tr> 
300
    <td>
301
<div id="mainarea">
302
              <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
303
                <tr> 
304
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
305
                  <td width="78%" class="vtable"> 
306
                    <input name="mode" type="radio" onclick="enable_change(false)" value="off"
307
				  	<?php if (($pconfig['mode'] != "server") && ($pconfig['mode'] != "redir")) echo "checked";?>>
308
                    Off</td>
309
                <tr> 
310
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
311
                  <td width="78%" class="vtable">
312
			<input type="radio" name="mode" value="redir" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "redir") echo "checked"; ?>>
313
                    Redirect incoming PPTP connections to:</td>
314
                <tr> 
315
                  <td width="22%" valign="top" class="vncellreq">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
                    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
                    Enable PPTP server</td>
326
                </tr>
327
                <tr> 
328
                  <td width="22%" valign="top" class="vncellreq">Server address</td>
329
                  <td width="78%" class="vtable"> 
330
                    <?=$mandfldhtml;?><input name="localip" type="text" class="formfld unknown" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip']);?>"> 
331
                    <br>
332
                    Enter the IP address the PPTP server should use on its side 
333
                    for all clients.</td>
334
                </tr>
335
                <tr> 
336
                  <td width="22%" valign="top" class="vncellreq">Remote address 
337
                    range</td>
338
                  <td width="78%" class="vtable"> 
339
                    <?=$mandfldhtml;?><input name="remoteip" type="text" class="formfld unknown" id="remoteip" size="20" value="<?=htmlspecialchars($pconfig['remoteip']);?>">
340
                    <br>
341
                    Specify the starting address for the client IP subnet.<br>
342
                </tr>
343
                <tr> 
344
                  <td width="22%" valign="top" class="vncellreq">Subnet netmask</td>
345
                  <td width="78%" class="vtable">
346
		    <select id="pptp_subnet" name="pptp_subnet">
347
		    <?php
348
		     for($x=0; $x<33; $x++) {
349
			if($x == $pconfig['pptp_subnet'])
350
				$SELECTED = " SELECTED";
351
			else
352
				$SELECTED = "";
353
			echo "<option value=\"{$x}\"{$SELECTED}>{$x}</option>\n";			
354
		     }
355
		    ?>
356
		    </select>
357
		    <br>Hint: 24 is 255.255.255.0
358
                  </td>
359
		</tr>
360
                <tr> 
361
                  <td width="22%" valign="top" class="vncellreq">No. PPTP users</td>
362
                  <td width="78%" class="vtable">
363
		    <select id="n_pptp_units" name="n_pptp_units">
364
		    <?php
365
		     for($x=0; $x<255; $x++) {
366
			if($x == $pconfig['n_pptp_units'])
367
				$SELECTED = " SELECTED";
368
			else
369
				$SELECTED = "";
370
			echo "<option value=\"{$x}\"{$SELECTED}>{$x}</option>\n";			
371
		     }
372
		    ?>
373
		    </select>
374
		    <br>Hint: 10 is TEN pptp clients
375
                  </td>
376
                </tr>
377
                <tr> 
378
                  <td width="22%" valign="top" class="vncellreq">PPTP DNS Servers</td>
379
                  <td width="78%" class="vtable"> 
380
                    <?=$mandfldhtml;?><input name="pptp_dns1" type="text" class="formfld unknown" id="pptp_dns1" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns1']);?>">
381
                    <br>
382
			<input name="pptp_dns2" type="text" class="formfld unknown" id="pptp_dns2" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns2']);?>">
383
                    <br>
384

    
385
                   primary and secondary DNS servers assigned to PPTP clients<br>
386
                </tr>
387
                <tr> 
388
                  <td width="22%" valign="top" class="vncell">WINS Server</td>
389
                  <td width="78%" valign="top" class="vtable">
390
                      <input name="wins" class="formfld unknown" id="wins" size="20" value="<?=htmlspecialchars($pconfig['wins']);?>">
391
                  </td>
392
                </tr>
393
                <tr> 
394
                  <td width="22%" valign="top" class="vncell">RADIUS</td>
395
                  <td width="78%" class="vtable"> 
396
                      <input name="radiusenable" type="checkbox" id="radiusenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiusenable']) echo "checked"; ?>>
397
                      <strong>Use a RADIUS server for authentication</strong><br>
398
                      When set, all users will be authenticated using 
399
                      the RADIUS server specified below. The local user database 
400
                      will not be used.<br>
401
                      <br>
402
                      <input name="radacct_enable" type="checkbox" id="radacct_enable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radacct_enable']) echo "checked"; ?>>
403
                      <strong>Enable RADIUS accounting <br>
404
                      </strong>Sends accounting packets to the RADIUS server.<br>
405
			 <br>
406
                      <input name="radiussecenable" type="checkbox" id="radiussecenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiussecenable']) echo "checked"; ?>>
407
                      <strong>Secondary RADIUS server for failover authentication</strong><br>
408
                      When set, all requests will go to the secondary server when primary fails<br>
409
		      <br>
410
                      <input name="radiusissueips" value="yes" type="checkbox" class="formfld" id="radiusissueips"<?php if($pconfig['radiusissueips']) echo " CHECKED"; ?>>
411
		      <strong>RADIUS issued IPs</strong>
412
                      <br>Issue IP addresses via RADIUS server.
413
		      </td>
414
                 </td>
415
                </tr>
416
                <tr> 
417
                  <td width="22%" valign="top" class="vncell">RADIUS NAS IP</td>
418
                  <td width="78%" valign="top" class="vtable">
419
                      <input name="radius_nasip" class="formfld unknown" id="radius_nasip" size="20" value="<?=htmlspecialchars($pconfig['radius_nasip']);?>">
420
                  </td>
421
		</tr>
422
                <tr> 
423
                  <td width="22%" valign="top" class="vncell">RADIUS Accounting Update</td>
424
                  <td width="78%" valign="top" class="vtable">
425
                      <input name="radius_acct_update" class="formfld unknown" id="radius_acct_update" size="20" value="<?=htmlspecialchars($pconfig['radius_acct_update']);?>">
426
                  </td>
427
		</tr>
428
                <tr> 
429
                  <td width="22%" valign="top" class="vncell">RADIUS Server </td>
430
                  <td width="78%" class="vtable">
431
                      <input name="radiusserver" type="text" class="formfld unknown" id="radiusserver" size="20" value="<?=htmlspecialchars($pconfig['radiusserver']);?>">
432
                      <input name="radiusserverport" type="text" class="formfld unknown" id="radiusserverport" size="4" value="<?=htmlspecialchars($pconfig['radiusserverport']);?>">
433
                      <input name="radiusserveracctport" type="text" class="formfld unknown" id="radiusserveracctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserveracctport']);?>">
434
                      <br>
435
                      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">RADIUS shared secret</td>
439
                  <td width="78%" valign="top" class="vtable">
440
                      <input name="radiussecret" type="password" class="formfld pwd" id="radiussecret" size="20" value="<?=htmlspecialchars($pconfig['radiussecret']);?>">
441
                      <br>
442
                      Enter the shared secret that will be used to authenticate 
443
                      to the RADIUS server.</td>
444
                </tr>
445
                <tr> 
446
                  <td width="22%" valign="top" class="vncell">Secondary RADIUS server </td>
447
                  <td width="78%" class="vtable">
448
                      <input name="radiusserver2" type="text" class="formfld unknown" id="radiusserver2" size="20" value="<?=htmlspecialchars($pconfig['radiusserver2']);?>">
449
                      <input name="radiusserver2port" type="text" class="formfld unknown" id="radiusserver2port" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2port']);?>">
450
                      <input name="radiusserver2acctport" type="text" class="formfld unknown" id="radiusserver2acctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2acctport']);?>">
451
                      <br>
452
                      Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server.</td>
453
                </tr>
454
                <tr> 
455
                  <td width="22%" valign="top" class="vncell">Secondary RADIUS shared secret</td>
456
                  <td width="78%" valign="top" class="vtable">
457
                      <input name="radiussecret2" type="password" class="formfld pwd" id="radiussecret2" size="20" value="<?=htmlspecialchars($pconfig['radiussecret2']);?>">
458
                      <br>
459
                      Enter the shared secret that will be used to authenticate 
460
                      to the secondary RADIUS server.</td>
461
                </tr>
462
                <tr> 
463
                  <td height="16" colspan="2" valign="top"></td>
464
                </tr>
465
                <tr> 
466
                  <td width="22%" valign="middle">&nbsp;</td>
467
                  <td width="78%" class="vtable"> 
468
                    <input name="req128" type="checkbox" id="req128" value="yes" <?php if ($pconfig['req128']) echo "checked"; ?>> 
469
                    <strong>Require 128-bit encryption</strong><br>
470
                    When set, only 128-bit encryption will be accepted. Otherwise 
471
                    40-bit and 56-bit encryption will be accepted as well. Note that 
472
                    encryption will always be forced on PPTP connections (i.e. 
473
                    unencrypted connections will not be accepted).</td>
474
                </tr>
475
                <tr> 
476
                  <td width="22%" valign="top">&nbsp;</td>
477
                  <td width="78%"> 
478
                    <input name="Submit" type="submit" class="formbtn" value="Save" onclick="enable_change(true)"> 
479
                  </td>
480
                </tr>
481
                <tr> 
482
                  <td width="22%" valign="top">&nbsp;</td>
483
                  <td width="78%"><span class="vexpl"><span class="red"><strong>Note:<br>
484
                    </strong></span>don't forget to <a href="firewall_rules.php?if=pptp">add a firewall rule</a> to permit 
485
                    traffic from PPTP clients!</span></td>
486
                </tr>
487
              </table>
488
</div>
489
			</td>
490
	</tr>
491
</table>
492
</form>
493
<script language="JavaScript">
494
<!--
495
enable_change(false);
496
//-->
497
</script>
498
<?php include("fend.inc"); ?>
499
</body>
500
</html>
(214-214/218)