Project

General

Profile

Download (24.3 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2

    
3
/*
4
	WARNING: DEPRICATED! SHOULD NOT BE CONVERTED. SEE https://github.com/SjonHortensius/pfsense/issues/229
5
*/
6

    
7
/*
8
	vpn_pptp.php
9
	part of m0n0wall (http://m0n0.ch/wall)
10
	
11
	Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
12
	Copyright (C) 2013-2015 Electric Sheep Fencing, LP
13
	All rights reserved.
14
	
15
	Redistribution and use in source and binary forms, with or without
16
	modification, are permitted provided that the following conditions are met:
17
	
18
	1. Redistributions of source code must retain the above copyright notice,
19
	   this list of conditions and the following disclaimer.
20
	
21
	2. Redistributions in binary form must reproduce the above copyright
22
	   notice, this list of conditions and the following disclaimer in the
23
	   documentation and/or other materials provided with the distribution.
24
	
25
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
26
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
27
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
29
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34
	POSSIBILITY OF SUCH DAMAGE.
35
*/
36

    
37
##|+PRIV
38
##|*IDENT=page-vpn-vpnpptp
39
##|*NAME=VPN: VPN PPTP page
40
##|*DESCR=Allow access to the 'VPN: VPN PPTP' page.
41
##|*MATCH=vpn_pptp.php*
42
##|-PRIV
43

    
44
require("guiconfig.inc");
45
require_once("functions.inc");
46
require_once("filter.inc");
47
require_once("shaper.inc");
48
require_once("vpn.inc");
49

    
50
if (!is_array($config['pptpd']['radius'])) {
51
	$config['pptpd']['radius'] = array();
52
}
53
$pptpcfg = &$config['pptpd'];
54

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

    
79
if ($_POST) {
80

    
81
	if (isset($input_errors))
82
		unset($input_errors);
83
	$pconfig = $_POST;
84

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

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

    
155
 		if ($_POST['pptp_dns1'] == "") {
156
			if (isset($pptpcfg['dns1']))
157
        			unset($pptpcfg['dns1']);
158
		} else
159
			$pptpcfg['dns1'] = $_POST['pptp_dns1'];
160

    
161
 		if ($_POST['pptp_dns2'] == "") {
162
			if (isset($pptpcfg['dns2']))
163
        			unset($pptpcfg['dns2']);
164
		} else
165
			$pptpcfg['dns2'] = $_POST['pptp_dns2'];
166

    
167
		if($_POST['req128'] == "yes") 
168
			$pptpcfg['req128'] = true;
169
		else if (isset($pptpcfg['req128']))
170
			unset($pptpcfg['req128']);
171

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

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

    
206
?>
207

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

    
221
function enable_change(enable_over) {
222
	if ((get_radio_value(document.iform.mode) == "server") || enable_over) {
223
		document.iform.remoteip.disabled = 0;
224
		document.iform.localip.disabled = 0;
225
		document.iform.req128.disabled = 0;
226
		document.iform.radiusenable.disabled = 0;
227
		document.iform.radiusissueips.disabled = 0;
228
		document.iform.wins.disabled = 0;
229
		document.iform.n_pptp_units.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
			document.iform.radiusserver2.disabled = 1;
266
			document.iform.radiussecret2.disabled = 1;
267
			document.iform.radiusserver2port.disabled = 1;
268
			document.iform.radiusserver2acctport.disabled = 1;
269
		}
270

    
271
	} else {
272
		document.iform.remoteip.disabled = 1;
273
		document.iform.localip.disabled = 1;
274
		document.iform.req128.disabled = 1;
275
		document.iform.n_pptp_units.disabled = 1;
276
		document.iform.pptp_dns1.disabled = 1;
277
		document.iform.pptp_dns2.disabled = 1;
278
		document.iform.radiusenable.disabled = 1;
279
		document.iform.radacct_enable.disabled = 1;
280
		document.iform.radiusserver.disabled = 1;
281
		document.iform.radiusserverport.disabled = 1;
282
		document.iform.radiusissueips.disabled = 1;
283
		document.iform.radiusserveracctport.disabled = 1;
284
		document.iform.radiussecret.disabled = 1;
285
		document.iform.radius_nasip.disabled = 1;	
286
		document.iform.radius_acct_update.disabled = 1;
287
		document.iform.radiussecenable.disabled = 1;
288
		document.iform.radiusserver2.disabled = 1;
289
		document.iform.radiusserver2port.disabled = 1;
290
		document.iform.radiusserver2acctport.disabled = 1;
291
		document.iform.radiussecret2.disabled = 1;	
292
		document.iform.wins.disabled = 1;
293
		document.iform.radiusissueips.disabled = 1;
294
	}
295
	if ((get_radio_value(document.iform.mode) == "redir") || enable_over) {
296
		document.iform.redir.disabled = 0;
297
	} else {
298
		document.iform.redir.disabled = 1;
299
	}
300
}
301
//]]>
302
</script>
303
<form action="vpn_pptp.php" method="post" name="iform" id="iform">
304
<?php if ($input_errors) print_input_errors($input_errors); ?>
305
<?php if ($savemsg) print_info_box($savemsg); ?>
306
<?php print_info_box(gettext("PPTP is no longer considered a secure VPN technology because it relies upon MS-CHAPv2 which has been compromised. If you continue to use PPTP be aware that intercepted traffic can be decrypted by a third party, so it should be considered unencrypted. We advise migrating to another VPN type such as OpenVPN or IPsec.<br /><br /><a href=\"https://isc.sans.edu/diary/End+of+Days+for+MS-CHAPv2/13807\">Read More</a>")); ?>
307
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="vpn pptp">
308
  <tr><td class="tabnavtbl">
309
<?php
310
	$tab_array = array();
311
	$tab_array[0] = array(gettext("Configuration"), true, "vpn_pptp.php");
312
	$tab_array[1] = array(gettext("Users"), false, "vpn_pptp_users.php");
313
	display_top_tabs($tab_array);
314
?>  
315
  </td></tr>
316
  <tr> 
317
    <td>
318
<div id="mainarea">
319
              <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
320
                <tr> 
321
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
322
                  <td width="78%" class="vtable"> 
323
                    <input name="mode" type="radio" onclick="enable_change(false)" value="off"
324
				  	<?php if (($pconfig['mode'] != "server") && ($pconfig['mode'] != "redir")) echo "checked=\"checked\"";?> />
325
                    <?=gettext("Off"); ?></td>
326
                </tr> 
327
                <tr> 
328
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
329
                  <td width="78%" class="vtable">
330

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