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