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
require("guiconfig.inc");
32

    
33
if (!is_array($config['pptpd']['radius'])) {
34
	$config['pptpd']['radius'] = array();
35
}
36
$pptpcfg = &$config['pptpd'];
37

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

    
63
if ($_POST) {
64

    
65
	unset($input_errors);
66
	$pconfig = $_POST;
67

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

    
123
		write_config();
124
	}
125

    
126
	if (!$input_errors) {
127
		$pptpcfg['remoteip'] = $_POST['remoteip'];
128
		$pptpcfg['redir'] = $_POST['redir'];
129
		$pptpcfg['localip'] = $_POST['localip'];
130
		$pptpcfg['mode'] = $_POST['mode'];
131
		$pptpcfg['wins'] = $_POST['wins'];
132
		$pptpcfg['n_pptp_units'] = $_POST['n_pptp_units'];	
133
		$pptpcfg['pptp_subnet'] = $_POST['pptp_subnet'];
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
		
184
		config_lock();
185
		$retval = vpn_setup();
186
		config_unlock();
187
		
188
		$savemsg = get_std_save_message($retval);
189
		
190
		filter_configure();
191
	}
192
}
193

    
194
$pgtitle = array("VPN,"VPN PPTP");
195
include("head.inc");
196

    
197
?>
198

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

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

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

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