diff --git a/usr/local/www/vpn_pppoe.php b/usr/local/www/vpn_pppoe.php new file mode 100755 index 0000000000..2e74d72375 --- /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"); + +?> + +
+ +=$pgtitle?>
+ + + + + +