Project

General

Profile

Download (22.8 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
		/* turning pptp off, lets dump any custom rules */
123
		$rules = &$config['filter']['rule'];
124
		for($x=0; $x<count($rules); $x++) {
125
			if($rules[$x]['interface'] == "pptp") { 
126
				unset($rules[$x]);
127
			}
128
		}
129
		unset($config['pptpd']['mode']);
130
	}
131

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

    
151
 		if ($_POST['pptp_dns1'] == "") 
152
        		unset($pptpcfg['dns1']);
153
		else
154
			$pptpcfg['dns1'] = $_POST['pptp_dns1'];
155

    
156
 		if ($_POST['pptp_dns2'] == "") 
157
        		unset($pptpcfg['dns2']);
158
		else
159
			$pptpcfg['dns2'] = $_POST['pptp_dns2'];
160

    
161
		if($_POST['req128'] == "yes") 
162
			$pptpcfg['req128'] = true;
163
		else
164
			unset($pptpcfg['req128']);
165

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

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

    
199
?>
200

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

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

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

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