Project

General

Profile

Download (23.1 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
require("guiconfig.inc");
39
require_once("functions.inc");
40
require_once("filter.inc");
41
require_once("shaper.inc");
42
require_once("vpn.inc");
43

    
44
if (!is_array($config['pptpd']['radius'])) {
45
	$config['pptpd']['radius'] = array();
46
}
47
$pptpcfg = &$config['pptpd'];
48

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

    
73
if ($_POST) {
74

    
75
	if (isset($input_errors))
76
		unset($input_errors);
77
	$pconfig = $_POST;
78

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

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

    
146
 		if ($_POST['pptp_dns1'] == "") {
147
			if (isset($pptpcfg['dns1']))
148
        			unset($pptpcfg['dns1']);
149
		} else
150
			$pptpcfg['dns1'] = $_POST['pptp_dns1'];
151

    
152
 		if ($_POST['pptp_dns2'] == "") {
153
			if (isset($pptpcfg['dns2']))
154
        			unset($pptpcfg['dns2']);
155
		} else
156
			$pptpcfg['dns2'] = $_POST['pptp_dns2'];
157

    
158
		if($_POST['req128'] == "yes") 
159
			$pptpcfg['req128'] = true;
160
		else if (isset($pptpcfg['req128']))
161
			unset($pptpcfg['req128']);
162

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

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

    
196
?>
197

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

    
211
function enable_change(enable_over) {
212
	if ((get_radio_value(document.iform.mode) == "server") || enable_over) {
213
		document.iform.remoteip.disabled = 0;
214
		document.iform.localip.disabled = 0;
215
		document.iform.req128.disabled = 0;
216
		document.iform.radiusenable.disabled = 0;
217
		document.iform.radiusissueips.disabled = 0;
218
		document.iform.wins.disabled = 0;
219
		document.iform.n_pptp_units.disabled = 0;
220
		document.iform.pptp_dns1.disabled = 0;
221
		document.iform.pptp_dns2.disabled = 0;	
222
		
223
		if (document.iform.radiusenable.checked || enable_over) {
224
			document.iform.radiussecenable.disabled = 0;
225
			document.iform.radacct_enable.disabled = 0;
226
			document.iform.radiusserver.disabled = 0;
227
			document.iform.radiusserverport.disabled = 0;
228
			document.iform.radiusserveracctport.disabled = 0;
229
			document.iform.radiussecret.disabled = 0;
230
			document.iform.radius_nasip.disabled = 0;	
231
			document.iform.radius_acct_update.disabled = 0;	
232
			document.iform.radiusissueips.disabled = 0;		
233
			if (document.iform.radiussecenable.checked || enable_over) {
234
				document.iform.radiusserver2.disabled = 0;
235
				document.iform.radiussecret2.disabled = 0;
236
				document.iform.radiusserver2port.disabled = 0;
237
				document.iform.radiusserver2acctport.disabled = 0;
238
			} else {
239
	
240
				document.iform.radiusserver2.disabled = 1;
241
				document.iform.radiussecret2.disabled = 1;
242
				document.iform.radiusserver2port.disabled = 1;
243
				document.iform.radiusserver2acctport.disabled = 1;
244
			}	
245
		} else {
246
			document.iform.radacct_enable.disabled = 1;
247
			document.iform.radiusserver.disabled = 1;
248
			document.iform.radiusserverport.disabled = 1;
249
			document.iform.radiusissueips.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
			document.iform.radiusserver2.disabled = 1;
256
			document.iform.radiussecret2.disabled = 1;
257
			document.iform.radiusserver2port.disabled = 1;
258
			document.iform.radiusserver2acctport.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_dns1.disabled = 1;
267
		document.iform.pptp_dns2.disabled = 1;
268
		document.iform.radiusenable.disabled = 1;
269
		document.iform.radacct_enable.disabled = 1;
270
		document.iform.radiusserver.disabled = 1;
271
		document.iform.radiusserverport.disabled = 1;
272
		document.iform.radiusissueips.disabled = 1;
273
		document.iform.radiusserveracctport.disabled = 1;
274
		document.iform.radiussecret.disabled = 1;
275
		document.iform.radius_nasip.disabled = 1;	
276
		document.iform.radius_acct_update.disabled = 1;
277
		document.iform.radiussecenable.disabled = 1;
278
		document.iform.radiusserver2.disabled = 1;
279
		document.iform.radiusserver2port.disabled = 1;
280
		document.iform.radiusserver2acctport.disabled = 1;
281
		document.iform.radiussecret2.disabled = 1;	
282
		document.iform.wins.disabled = 1;
283
		document.iform.radiusissueips.disabled = 1;
284
	}
285
	if ((get_radio_value(document.iform.mode) == "redir") || enable_over) {
286
		document.iform.redir.disabled = 0;
287
	} else {
288
		document.iform.redir.disabled = 1;
289
	}
290
}
291
//-->
292
</script>
293
<form action="vpn_pptp.php" method="post" name="iform" id="iform">
294
<?php if ($input_errors) print_input_errors($input_errors); ?>
295
<?php if ($savemsg) print_info_box($savemsg); ?>
296
<table width="100%" border="0" cellpadding="0" cellspacing="0">
297
  <tr><td class="tabnavtbl">
298
<?php
299
	$tab_array = array();
300
	$tab_array[0] = array(gettext("Configuration"), true, "vpn_pptp.php");
301
	$tab_array[1] = array(gettext("Users"), false, "vpn_pptp_users.php");
302
	display_top_tabs($tab_array);
303
?>  
304
  </td></tr>
305
  <tr> 
306
    <td>
307
<div id="mainarea">
308
              <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
309
                <tr> 
310
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
311
                  <td width="78%" class="vtable"> 
312
                    <input name="mode" type="radio" onclick="enable_change(false)" value="off"
313
				  	<?php if (($pconfig['mode'] != "server") && ($pconfig['mode'] != "redir")) echo "checked";?>>
314
                    <?=gettext("Off"); ?></td>
315
                <tr> 
316
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
317
                  <td width="78%" class="vtable">
318

    
319
			<input type="radio" name="mode" value="redir" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "redir") echo "checked" ?>>
320
                    <?=gettext("Redirect incoming PPTP connections to");?>:</td>
321
				<tr>
322
				  <td width="22%" valign="top" class="vncellreq"><?=gettext("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
                    <?=gettext("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
                    <?=gettext("Enable PPTP server"); ?></td>
333
                </tr>
334
				<tr>
335
					<td width="22%" valign="top" class="vncellreq"><?=gettext("No. PPTP users"); ?></td>
336
					<td width="78%" class="vtable">
337
						<select id="n_pptp_units" name="n_pptp_units">
338
							<?php
339
								$toselect = ($pconfig['n_pptp_units'] > 0) ? $pconfig['n_pptp_units'] : 16;
340
								for($x=1; $x<255; $x++) {
341
									if($x == $toselect)
342
										$SELECTED = " SELECTED";
343
									else
344
										$SELECTED = "";
345
									echo "<option value=\"{$x}\"{$SELECTED}>{$x}</option>\n";
346
								}
347
							?>
348
						</select>
349
						<br><?=gettext("Hint: 10 is ten PPTP clients"); ?>
350
					</td>
351
				</tr>
352
                <tr> 
353
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Server address"); ?></td>
354
                  <td width="78%" class="vtable"> 
355
                    <?=$mandfldhtml;?><input name="localip" type="text" class="formfld unknown" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip']);?>"> 
356
			<br/>
357
			<?=gettext("Enter the IP address the PPTP server should give to clients for use as their \"gateway\""); ?>.
358
			<br/>
359
			<?=gettext("Typically this is set to an unused IP just outside of the client range"); ?>.
360
			<br/>
361
			<br/>
362
			<?=gettext("NOTE: This should NOT be set to any IP address currently in use on this firewall"); ?>.</td>
363
                </tr>
364
                <tr> 
365
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Remote address " .
366
                    "range"); ?></td>
367
                  <td width="78%" class="vtable"> 
368
                    <?=$mandfldhtml;?><input name="remoteip" type="text" class="formfld unknown" id="remoteip" size="20" value="<?=htmlspecialchars($pconfig['remoteip']);?>">
369
                    <br>
370
                    <?=gettext("Specify the starting address for the client IP subnet"); ?>.<br>
371
                </tr>
372
                <tr> 
373
                  <td width="22%" valign="top" class="vncell"><?=gettext("PPTP DNS Servers"); ?></td>
374
                  <td width="78%" class="vtable"> 
375
                    <?=$mandfldhtml;?><input name="pptp_dns1" type="text" class="formfld unknown" id="pptp_dns1" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns1']);?>">
376
                    <br>
377
					<input name="pptp_dns2" type="text" class="formfld unknown" id="pptp_dns2" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns2']);?>">
378
                    <br>
379
                   <?=gettext("primary and secondary DNS servers assigned to PPTP clients"); ?><br>
380
                </tr>
381
                <tr> 
382
                  <td width="22%" valign="top" class="vncell"><?=gettext("WINS Server"); ?></td>
383
                  <td width="78%" valign="top" class="vtable">
384
                      <input name="wins" class="formfld unknown" id="wins" size="20" value="<?=htmlspecialchars($pconfig['wins']);?>">
385
                  </td>
386
                </tr>
387
                <tr> 
388
                  <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS"); ?></td>
389
                  <td width="78%" class="vtable"> 
390
                      <input name="radiusenable" type="checkbox" id="radiusenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiusenable']) echo "checked"; ?>>
391
                      <strong><?=gettext("Use a RADIUS server for authentication"); ?></strong><br>
392
                      <?=gettext("When set, all users will be authenticated using " .
393
                      "the RADIUS server specified below. The local user database " .
394
                      "will not be used"); ?>.<br>
395
                      <br>
396
                      <input name="radacct_enable" type="checkbox" id="radacct_enable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radacct_enable']) echo "checked"; ?>>
397
                      <strong><?=gettext("Enable RADIUS accounting"); ?> <br>
398
                      </strong><?=gettext("Sends accounting packets to the RADIUS server"); ?>.<br>
399
			 <br>
400
                      <input name="radiussecenable" type="checkbox" id="radiussecenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiussecenable']) echo "checked"; ?>>
401
                      <strong><?=gettext("Secondary RADIUS server for failover authentication"); ?></strong><br>
402
                      <?=gettext("When set, all requests will go to the secondary server when primary fails"); ?><br>
403
		      <br>
404
                      <input name="radiusissueips" value="yes" type="checkbox" class="formfld" id="radiusissueips"<?php if($pconfig['radiusissueips']) echo " CHECKED"; ?>>
405
		      <strong><?=gettext("RADIUS issued IPs"); ?></strong>
406
                      <br><?=gettext("Issue IP addresses via RADIUS server"); ?>.
407
		      </td>
408
                 </td>
409
                </tr>
410
                <tr> 
411
                  <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS NAS IP"); ?></td>
412
                  <td width="78%" valign="top" class="vtable">
413
                      <input name="radius_nasip" class="formfld unknown" id="radius_nasip" size="20" value="<?=htmlspecialchars($pconfig['radius_nasip']);?>">
414
                  </td>
415
		</tr>
416
                <tr> 
417
                  <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS Accounting Update"); ?></td>
418
                  <td width="78%" valign="top" class="vtable">
419
                      <input name="radius_acct_update" class="formfld unknown" id="radius_acct_update" size="20" value="<?=htmlspecialchars($pconfig['radius_acct_update']);?>">
420
                  </td>
421
		</tr>
422
                <tr> 
423
                  <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS Server"); ?> </td>
424
                  <td width="78%" class="vtable">
425
                      <input name="radiusserver" type="text" class="formfld unknown" id="radiusserver" size="20" value="<?=htmlspecialchars($pconfig['radiusserver']);?>">
426
                      <input name="radiusserverport" type="text" class="formfld unknown" id="radiusserverport" size="4" value="<?=htmlspecialchars($pconfig['radiusserverport']);?>">
427
                      <input name="radiusserveracctport" type="text" class="formfld unknown" id="radiusserveracctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserveracctport']);?>">
428
                      <br>
429
                      <?=gettext("Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server"); ?>.</td>
430
                </tr>
431
                <tr> 
432
                  <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS shared secret"); ?></td>
433
                  <td width="78%" valign="top" class="vtable">
434
                      <input name="radiussecret" type="password" class="formfld pwd" id="radiussecret" size="20" value="<?=htmlspecialchars($pconfig['radiussecret']);?>">
435
                      <br>
436
                      <?=gettext("Enter the shared secret that will be used to authenticate " .
437
                      "to the RADIUS server"); ?>.</td>
438
                </tr>
439
                <tr> 
440
                  <td width="22%" valign="top" class="vncell"><?=gettext("Secondary RADIUS server"); ?> </td>
441
                  <td width="78%" class="vtable">
442
                      <input name="radiusserver2" type="text" class="formfld unknown" id="radiusserver2" size="20" value="<?=htmlspecialchars($pconfig['radiusserver2']);?>">
443
                      <input name="radiusserver2port" type="text" class="formfld unknown" id="radiusserver2port" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2port']);?>">
444
                      <input name="radiusserver2acctport" type="text" class="formfld unknown" id="radiusserver2acctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2acctport']);?>">
445
                      <br>
446
                      <?=gettext("Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server"); ?>.</td>
447
                </tr>
448
                <tr> 
449
                  <td width="22%" valign="top" class="vncell"><?=gettext("Secondary RADIUS shared secret"); ?></td>
450
                  <td width="78%" valign="top" class="vtable">
451
                      <input name="radiussecret2" type="password" class="formfld pwd" id="radiussecret2" size="20" value="<?=htmlspecialchars($pconfig['radiussecret2']);?>">
452
                      <br>
453
                      <?=gettext("Enter the shared secret that will be used to authenticate " .
454
                      "to the secondary RADIUS server"); ?>.</td>
455
                </tr>
456
                <tr> 
457
                  <td height="16" colspan="2" valign="top"></td>
458
                </tr>
459
                <tr> 
460
                  <td width="22%" valign="middle">&nbsp;</td>
461
                  <td width="78%" class="vtable"> 
462
                    <input name="req128" type="checkbox" id="req128" value="yes" <?php if ($pconfig['req128']) echo "checked"; ?>> 
463
                    <strong><?=gettext("Require 128-bit encryption"); ?></strong><br>
464
                    <?=gettext("When set, only 128-bit encryption will be accepted. Otherwise " .
465
                    "40-bit and 56-bit encryption will be accepted as well. Note that " .
466
                    "encryption will always be forced on PPTP connections (i.e. " .
467
                    "unencrypted connections will not be accepted)"); ?>.</td>
468
                </tr>
469
                <tr> 
470
                  <td width="22%" valign="top">&nbsp;</td>
471
                  <td width="78%"> 
472
                    <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)"> 
473
                  </td>
474
                </tr>
475
                <tr> 
476
                  <td width="22%" valign="top">&nbsp;</td>
477
                  <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br>
478
                    </strong></span><?=gettext("don't forget to ");?><a href="firewall_rules.php?if=pptp"><?=gettext("add a firewall rule"); ?></a> <?=gettext("to permit ". 
479
                    "traffic from PPTP clients");?>!</span></td>
480
                 </tr>
481
              </table>
482
</div>
483
			</td>
484
	</tr>
485
</table>
486
</form>
487
<script language="JavaScript">
488
<!--
489
enable_change(false);
490
//-->
491
</script>
492
<?php include("fend.inc"); ?>
493
</body>
494
</html>
(224-224/228)