Project

General

Profile

Download (22.9 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['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'], $g['pptp_subnet']);
101
			$subnet_start = ip2long($_POST['remoteip']);
102
			$subnet_end = ip2long($_POST['remoteip']) + $g['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'] == $config['interfaces']['lan']['ipaddr']) {
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
		
192
		config_lock();
193
		$retval = vpn_setup();
194
		config_unlock();
195
		
196
		$savemsg = get_std_save_message($retval);
197
		
198
		filter_configure();
199
	}
200
}
201

    
202
$pgtitle = array("VPN","VPN PPTP");
203
include("head.inc");
204

    
205
?>
206

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

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

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

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