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']['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
		write_config();
132
	}
133

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

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

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

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

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

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

    
201
?>
202

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

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

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

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