Project

General

Profile

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

    
32
##|+PRIV
33
##|*IDENT=page-vpn-vpnpptp
34
##|*NAME=VPN: VPN PPTP page
35
##|*DESCR=Allow access to the 'VPN: VPN PPTP' page.
36
##|*MATCH=vpn_pptp.php*
37
##|-PRIV
38

    
39
require("guiconfig.inc");
40
require_once("functions.inc");
41
require_once("filter.inc");
42
require_once("shaper.inc");
43
require_once("vpn.inc");
44

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

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

    
74
if ($_POST) {
75

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

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

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

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

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

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

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

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

    
201
?>
202

    
203
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
204
<?php include("fbegin.inc"); ?>
205
<script type="text/javascript">
206
//<![CDATA[
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_dns1.disabled = 0;
226
		document.iform.pptp_dns2.disabled = 0;	
227
		
228
		if (document.iform.radiusenable.checked || enable_over) {
229
			document.iform.radiussecenable.disabled = 0;
230
			document.iform.radacct_enable.disabled = 0;
231
			document.iform.radiusserver.disabled = 0;
232
			document.iform.radiusserverport.disabled = 0;
233
			document.iform.radiusserveracctport.disabled = 0;
234
			document.iform.radiussecret.disabled = 0;
235
			document.iform.radius_nasip.disabled = 0;	
236
			document.iform.radius_acct_update.disabled = 0;	
237
			document.iform.radiusissueips.disabled = 0;		
238
			if (document.iform.radiussecenable.checked || enable_over) {
239
				document.iform.radiusserver2.disabled = 0;
240
				document.iform.radiussecret2.disabled = 0;
241
				document.iform.radiusserver2port.disabled = 0;
242
				document.iform.radiusserver2acctport.disabled = 0;
243
			} else {
244
	
245
				document.iform.radiusserver2.disabled = 1;
246
				document.iform.radiussecret2.disabled = 1;
247
				document.iform.radiusserver2port.disabled = 1;
248
				document.iform.radiusserver2acctport.disabled = 1;
249
			}	
250
		} else {
251
			document.iform.radacct_enable.disabled = 1;
252
			document.iform.radiusserver.disabled = 1;
253
			document.iform.radiusserverport.disabled = 1;
254
			document.iform.radiusissueips.disabled = 1;
255
			document.iform.radiusserveracctport.disabled = 1;
256
			document.iform.radiussecret.disabled = 1;
257
			document.iform.radius_nasip.disabled = 1;	
258
			document.iform.radius_acct_update.disabled = 1;	
259
			document.iform.radiusissueips.disabled = 1;
260
			document.iform.radiusserver2.disabled = 1;
261
			document.iform.radiussecret2.disabled = 1;
262
			document.iform.radiusserver2port.disabled = 1;
263
			document.iform.radiusserver2acctport.disabled = 1;
264
		}
265

    
266
	} else {
267
		document.iform.remoteip.disabled = 1;
268
		document.iform.localip.disabled = 1;
269
		document.iform.req128.disabled = 1;
270
		document.iform.n_pptp_units.disabled = 1;
271
		document.iform.pptp_dns1.disabled = 1;
272
		document.iform.pptp_dns2.disabled = 1;
273
		document.iform.radiusenable.disabled = 1;
274
		document.iform.radacct_enable.disabled = 1;
275
		document.iform.radiusserver.disabled = 1;
276
		document.iform.radiusserverport.disabled = 1;
277
		document.iform.radiusissueips.disabled = 1;
278
		document.iform.radiusserveracctport.disabled = 1;
279
		document.iform.radiussecret.disabled = 1;
280
		document.iform.radius_nasip.disabled = 1;	
281
		document.iform.radius_acct_update.disabled = 1;
282
		document.iform.radiussecenable.disabled = 1;
283
		document.iform.radiusserver2.disabled = 1;
284
		document.iform.radiusserver2port.disabled = 1;
285
		document.iform.radiusserver2acctport.disabled = 1;
286
		document.iform.radiussecret2.disabled = 1;	
287
		document.iform.wins.disabled = 1;
288
		document.iform.radiusissueips.disabled = 1;
289
	}
290
	if ((get_radio_value(document.iform.mode) == "redir") || enable_over) {
291
		document.iform.redir.disabled = 0;
292
	} else {
293
		document.iform.redir.disabled = 1;
294
	}
295
}
296
//]]>
297
</script>
298
<form action="vpn_pptp.php" method="post" name="iform" id="iform">
299
<?php if ($input_errors) print_input_errors($input_errors); ?>
300
<?php if ($savemsg) print_info_box($savemsg); ?>
301
<?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>")); ?>
302
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="vpn pptp">
303
  <tr><td class="tabnavtbl">
304
<?php
305
	$tab_array = array();
306
	$tab_array[0] = array(gettext("Configuration"), true, "vpn_pptp.php");
307
	$tab_array[1] = array(gettext("Users"), false, "vpn_pptp_users.php");
308
	display_top_tabs($tab_array);
309
?>  
310
  </td></tr>
311
  <tr> 
312
    <td>
313
<div id="mainarea">
314
              <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
315
                <tr> 
316
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
317
                  <td width="78%" class="vtable"> 
318
                    <input name="mode" type="radio" onclick="enable_change(false)" value="off"
319
				  	<?php if (($pconfig['mode'] != "server") && ($pconfig['mode'] != "redir")) echo "checked=\"checked\"";?> />
320
                    <?=gettext("Off"); ?></td>
321
                </tr> 
322
                <tr> 
323
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
324
                  <td width="78%" class="vtable">
325

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