From 3818935a3d67a151ca549b1383d1ea35bb146e15 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 30 Jul 2005 20:18:36 +0000 Subject: Say hello to our PPPoE server gui --- usr/local/www/vpn_pppoe.php | 321 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 321 insertions(+) create mode 100755 usr/local/www/vpn_pppoe.php (limited to 'usr') diff --git a/usr/local/www/vpn_pppoe.php b/usr/local/www/vpn_pppoe.php new file mode 100755 index 0000000..2e74d72 --- /dev/null +++ b/usr/local/www/vpn_pppoe.php @@ -0,0 +1,321 @@ +#!/usr/local/bin/php += $subnet_start) && + (ip2long($_POST['localip']) <= $subnet_end)) { + $input_errors[] = "The specified server address lies in the remote subnet."; + } + if ($_POST['localip'] == $config['interfaces']['lan']['ipaddr']) { + $input_errors[] = "The specified server address is equal to the LAN interface address."; + } + } + } else if ($_POST['mode'] == "redir") { + $reqdfields = explode(" ", "redir"); + $reqdfieldsn = explode(",", "PPPoE redirection target address"); + + do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); + + if (($_POST['redir'] && !is_ipaddr($_POST['redir']))) { + $input_errors[] = "A valid target address must be specified."; + } + } + + if (!$input_errors) { + $pppoecfg['remoteip'] = $_POST['remoteip']; + $pppoecfg['redir'] = $_POST['redir']; + $pppoecfg['localip'] = $_POST['localip']; + $pppoecfg['mode'] = $_POST['mode']; + $pppoecfg['wins'] = $_POST['wins']; + $pppoecfg['req128'] = $_POST['req128'] ? true : false; + $pppoecfg['radius']['enable'] = $_POST['radiusenable'] ? true : false; + $pppoecfg['radius']['accounting'] = $_POST['radacct_enable'] ? true : false; + $pppoecfg['radius']['server'] = $_POST['radiusserver']; + $pppoecfg['radius']['secret'] = $_POST['radiussecret']; + + write_config(); + + $retval = 0; + + config_lock(); + $retval = vpn_pppoe_configure(); + config_unlock(); + + $savemsg = get_std_save_message($retval); + } +} + +$pgtitle = "VPN PPPoE"; +include("head.inc"); + +?> + + + +

+ +
+ + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  + > + Off
  +> + Redirect incoming PPPoE connections to:
PPPoE redirection + +
+ Enter the IP address of a host which will accept incoming + PPPoE connections.
  +> + Enable PPPoE server
Max. concurrent + connections + +
Server address + +
+ Enter the IP address the PPPoE server should use on its side + for all clients.
Remote address + range + + / + +
+ Specify the starting address for the client IP address subnet.
+ The PPPoE server will assign + + addresses, starting at the address entered above, to clients.
RADIUS + > + Use a RADIUS server for authentication
+
When set, all users will be authenticated using + the RADIUS server specified below. The local user database + will not be used.
+
+ > + Enable RADIUS accounting
+
Sends accounting packets to the RADIUS server.
RADIUS server + +
+ Enter the IP address of the RADIUS server.
RADIUS shared secret + +
+ Enter the shared secret that will be used to authenticate + to the RADIUS server.
WINS Server + +
  + > + Require 128-bit encryption
+ When set, 128-bit encryption will be accepted. Otherwise, + 40-bit and 56-bit encryption will be accepted, too. Note that + encryption will always be forced on PPPoE connections (i.e. + unencrypted connections will not be accepted).
  + +
 Note:
+
don't forget to add a firewall rule to permit + traffic from PPPoE clients!
+
+
+
+ + + + -- cgit v1.1