From 7e5f3edbf67907370c280330855ccbfc00802fec Mon Sep 17 00:00:00 2001 From: Warren Baker Date: Thu, 17 Mar 2011 12:21:01 +0200 Subject: Add Total number of CP users graph --- usr/local/www/status_rrd_graph_img.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'usr') diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php index dccdecc..2094a87 100644 --- a/usr/local/www/status_rrd_graph_img.php +++ b/usr/local/www/status_rrd_graph_img.php @@ -960,6 +960,28 @@ elseif((strstr($curdatabase, "-concurrent.rrd")) && (file_exists("$rrddbpath$cur $graphcmd .= "COMMENT:\"\\n\" "; $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t`date +\"%b %d %H\:%M\:%S %Y\"`\" "; } +elseif((strstr($curdatabase, "-totalusers.rrd")) && (file_exists("$rrddbpath$curdatabase"))) { + /* define graphcmd for online Captive Portal users stats */ + $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png "; + $graphcmd .= "--start $start --end $end "; + $graphcmd .= "--vertical-label \"Total Captive Portal Users\" "; + $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee "; + $graphcmd .= "--base=1000 "; + $graphcmd .= "--lower-limit=0 "; + $graphcmd .= "--slope-mode "; + $graphcmd .= "--title \"`hostname` - {$prettydb} - {$hperiod} - {$havg} average\" "; + $graphcmd .= "--height 200 --width 620 "; + $graphcmd .= "DEF:\"$curif-totalusers=$rrddbpath$curdatabase:totalusers:AVERAGE\" "; + $graphcmd .= "AREA:\"$curif-totalusers#{$colorcaptiveportalusers[0]}:$curif-totalusers\" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t current\t\t average\t maximum\\n\" "; + $graphcmd .= "COMMENT:\"Users Online\t\" "; + $graphcmd .= "GPRINT:\"$curif-totalusers:LAST:%8.0lf \" "; + $graphcmd .= "GPRINT:\"$curif-totalusers:AVERAGE:%8.0lf \" "; + $graphcmd .= "GPRINT:\"$curif-totalusers:MAX:%8.0lf \" "; + $graphcmd .= "COMMENT:\"\\n\" "; + $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t`date +\"%b %d %H\:%M\:%S %Y\"`\" "; +} else { $data = false; log_error(sprintf(gettext("Sorry we do not have data to graph for %s"),$curdatabase)); -- cgit v1.1 From 375828d911b37e0e63a5e2530f8e8d88ee79e8e1 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Sun, 20 Mar 2011 16:56:23 -0400 Subject: fix text --- usr/local/www/services_captiveportal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr') diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php index faaeb37..24595da 100755 --- a/usr/local/www/services_captiveportal.php +++ b/usr/local/www/services_captiveportal.php @@ -614,7 +614,7 @@ value=""> } ?>
- + -- cgit v1.1 From bf87b4d7d1e9c0064e59727afd7601c111f6f3da Mon Sep 17 00:00:00 2001 From: lgcosta Date: Mon, 21 Mar 2011 15:56:43 -0300 Subject: Added option to select the type of device for use in the tunnel openvpn --- usr/local/www/vpn_openvpn_server.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'usr') diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php index 0f751e7..f15a9ae 100644 --- a/usr/local/www/vpn_openvpn_server.php +++ b/usr/local/www/vpn_openvpn_server.php @@ -91,6 +91,7 @@ if($_GET['act']=="new"){ $pconfig['tlsauth_enable'] = "yes"; $pconfig['autotls_enable'] = "yes"; $pconfig['dh_length'] = 1024; + $pconfig['device_mode'] = "tun"; $pconfig['interface'] = "wan"; $pconfig['local_port'] = openvpn_port_next('UDP'); $pconfig['pool_enable'] = "yes"; @@ -104,6 +105,7 @@ if($_GET['act']=="edit"){ $pconfig['mode'] = $a_server[$id]['mode']; $pconfig['protocol'] = $a_server[$id]['protocol']; $pconfig['authmode'] = $a_server[$id]['authmode']; + $pconfig['device_mode'] = $a_server[$id]['device_mode']; $pconfig['interface'] = $a_server[$id]['interface']; if (!empty($a_server[$id]['ipaddr'])) { $pconfig['interface'] = $pconfig['interface'] . '|' . $a_server[$id]['ipaddr']; @@ -304,6 +306,7 @@ if ($_POST) { if (!empty($pconfig['authmode'])) $server['authmode'] = implode(",", $pconfig['authmode']); $server['protocol'] = $pconfig['protocol']; + $server['device_mode'] = $pconfig['device_mode']; list($server['interface'], $server['ipaddr']) = explode ("|",$pconfig['interface']); $server['local_port'] = $pconfig['local_port']; $server['description'] = $pconfig['description']; @@ -663,6 +666,21 @@ if ($savemsg) + + + + + + -- cgit v1.1 From 633de32902a1517418057f0b214600a62f1b7559 Mon Sep 17 00:00:00 2001 From: gnhb Date: Tue, 22 Mar 2011 07:43:19 +0700 Subject: Add missing "Connect/Disconnect" button to GUI for L2TP client connections. --- usr/local/www/status_interfaces.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'usr') diff --git a/usr/local/www/status_interfaces.php b/usr/local/www/status_interfaces.php index d6fdced..266d36b 100755 --- a/usr/local/www/status_interfaces.php +++ b/usr/local/www/status_interfaces.php @@ -132,6 +132,21 @@ include("head.inc"); + + + + +    + + + " class="formbtns"> + + + " class="formbtns"> + + + + -- cgit v1.1 From e4d40f41aafe00353c0069b457a0b1b0d6c20987 Mon Sep 17 00:00:00 2001 From: gnhb Date: Tue, 22 Mar 2011 07:44:11 +0700 Subject: Update GUI to enable L2TP client configuration. --- usr/local/www/interfaces.php | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) (limited to 'usr') diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index d1fa6f7..2469631 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -159,7 +159,7 @@ if ($wancfg['if'] == $a_ppps[$pppid]['if']) { } }// End force pppoe reset at specific time }// End if type == pppoe - else if ($a_ppps[$pppid]['type'] == "pptp"){ + else if ($a_ppps[$pppid]['type'] == "pptp" || $a_ppps[$pppid]['type'] == "l2tp"){ $pconfig['pptp_username'] = $a_ppps[$pppid]['username']; $pconfig['pptp_password'] = base64_decode($a_ppps[$pppid]['password']); $pconfig['pptp_local'] = explode(",",$a_ppps[$pppid]['localip']); @@ -175,6 +175,7 @@ if ($wancfg['if'] == $a_ppps[$pppid]['if']) { $pconfig['dhcphostname'] = $wancfg['dhcphostname']; $pconfig['alias-address'] = $wancfg['alias-address']; $pconfig['alias-subnet'] = $wancfg['alias-subnet']; +$pconfig['dhcp_plus'] = isset($wancfg['dhcp_plus']); $pconfig['descr'] = remove_bad_chars($wancfg['descr']); $pconfig['enable'] = isset($wancfg['enable']); @@ -196,6 +197,7 @@ switch($wancfg['ipaddr']) { break; case "pppoe": case "pptp": + case "l2tp": case "ppp": $pconfig['type'] = $wancfg['ipaddr']; break; @@ -415,6 +417,16 @@ if ($_POST['apply']) { } do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); break; + case "l2tp": + if ($_POST['pptp_dialondemand']) { + $reqdfields = explode(" ", "pptp_username pptp_password pptp_remote pptp_dialondemand pptp_idletimeout"); + $reqdfieldsn = array(gettext("L2TP username"),gettext("L2TP password"),gettext("L2TP remote IP address"),gettext("Dial on demand"),gettext("Idle timeout value")); + } else { + $reqdfields = explode(" ", "pptp_username pptp_password pptp_remote"); + $reqdfieldsn = array(gettext("L2TP username"),gettext("L2TP password"),gettext("L2TP remote IP address")); + } + do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); + break; } /* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */ @@ -454,7 +466,7 @@ if ($_POST['apply']) { $input_errors[] = gettext("A valid PPTP local IP address must be specified."); if (($_POST['pptp_subnet'] && !is_numeric($_POST['pptp_subnet']))) $input_errors[] = gettext("A valid PPTP subnet bit count must be specified."); - if (($_POST['pptp_remote'] && !is_ipaddr($_POST['pptp_remote']))) + if (($_POST['pptp_remote'] && !is_ipaddr($_POST['pptp_remote']) && !is_hostname($_POST['gateway'][$iface]))) $input_errors[] = gettext("A valid PPTP remote IP address must be specified."); if (($_POST['pptp_idletimeout'] != "") && !is_numericint($_POST['pptp_idletimeout'])) $input_errors[] = gettext("The idle timeout value must be an integer."); @@ -588,6 +600,7 @@ if ($_POST['apply']) { $wancfg['dhcphostname'] = $_POST['dhcphostname']; $wancfg['alias-address'] = $_POST['alias-address']; $wancfg['alias-subnet'] = $_POST['alias-subnet']; + $wancfg['dhcp_plus'] = $_POST['dhcp_plus'] == "yes" ? true : false; if($gateway_item) { $a_gateways[] = $gateway_item; } @@ -648,6 +661,7 @@ if ($_POST['apply']) { break; case "pptp": + case "l2tp": $a_ppps[$pppid]['ptpid'] = $_POST['ptpid']; $a_ppps[$pppid]['type'] = $_POST['type']; $a_ppps[$pppid]['if'] = $_POST['type'].$_POST['ptpid']; @@ -888,7 +902,7 @@ $statusurl = "status_interfaces.php"; $closehead = false; include("head.inc"); -$types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" => gettext("DHCP"), "ppp" => gettext("PPP"), "pppoe" => gettext("PPPoE"), "pptp" => gettext("PPTP") /* , "carpdev-dhcp" => "CarpDev"*/); +$types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" => gettext("DHCP"), "ppp" => gettext("PPP"), "pppoe" => gettext("PPPoE"), "pptp" => gettext("PPTP"), "l2tp" => gettext("L2TP") /* , "carpdev-dhcp" => "CarpDev"*/); ?> @@ -921,12 +935,15 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" $('none','static','dhcp','pptp', 'ppp').invoke('hide'); break; } + case "l2tp": case "pptp": { $('none','static','dhcp','pppoe', 'ppp').invoke('hide'); + $('pptp').show(); break; } } - $(t).show(); + if (t != "l2tp" && t != "pptp") + $(t).show(); } function show_allcfg(obj) { @@ -1250,6 +1267,17 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" + @@ -1279,6 +1307,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" "DHCP client."); ?> + @@ -1489,7 +1518,7 @@ $types = array("none" => gettext("None"), "static" => gettext("Static"), "dhcp" - + -- cgit v1.1 From 66fc1f14ee447c8b31620e799b5fd2f54b4a583d Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 22 Mar 2011 10:21:03 -0400 Subject: Add all to the reserved keywords --- usr/local/www/firewall_aliases_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr') diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index 33d124e..ce730e1 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -46,7 +46,7 @@ // Keywords not allowed in names -$reserved_keywords = array("pass", "out", "queue", "max", "min", "pptp", "pppoe", "L2TP", "OpenVPN", "IPsec"); +$reserved_keywords = array("all", "pass", "out", "queue", "max", "min", "pptp", "pppoe", "L2TP", "OpenVPN", "IPsec"); require("guiconfig.inc"); require_once("functions.inc"); -- cgit v1.1 From 6be14e38fdebf095e91845a92dae5374b90ef502 Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 22 Mar 2011 18:19:49 +0000 Subject: Unbreak adding subqueues to limiters. Correct some text in the way. --- usr/local/www/firewall_shaper_vinterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr') diff --git a/usr/local/www/firewall_shaper_vinterface.php b/usr/local/www/firewall_shaper_vinterface.php index 5222771..fae5429 100644 --- a/usr/local/www/firewall_shaper_vinterface.php +++ b/usr/local/www/firewall_shaper_vinterface.php @@ -72,7 +72,7 @@ if ($_POST) { if ($_POST['name']) $qname = htmlspecialchars(trim($_POST['name'])); else if ($_POST['newname']) - $qname = htmlspecialchars(trim($_POST['name'])); + $qname = htmlspecialchars(trim($_POST['newname'])); if ($_POST['pipe']) $pipe = htmlspecialchars(trim($_POST['pipe'])); else -- cgit v1.1 From 084e77e775bae15e92076297fbf7a8cf5c9b2b51 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Tue, 22 Mar 2011 20:36:10 -0400 Subject: fix text --- usr/local/www/vpn_pptp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr') diff --git a/usr/local/www/vpn_pptp.php b/usr/local/www/vpn_pptp.php index 84f4020..5be5e6e 100755 --- a/usr/local/www/vpn_pptp.php +++ b/usr/local/www/vpn_pptp.php @@ -342,7 +342,7 @@ function enable_change(enable_over) { } ?> -
+
-- cgit v1.1