#!/usr/local/bin/php . All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ require("guiconfig.inc"); $lancfg = &$config['interfaces']['lan']; $pconfig['ipaddr'] = $lancfg['ipaddr']; $pconfig['subnet'] = $lancfg['subnet']; $pconfig['bandwidth'] = $lancfg['bandwidth']; $pconfig['bandwidthtype'] = $lancfg['bandwidthtype']; /* Wireless interface? */ if (isset($lancfg['wireless'])) { require("interfaces_wlan.inc"); wireless_config_init(); } if ($_POST) { unset($input_errors); $pconfig = $_POST; $changedesc = "LAN Interface: "; /* input validation */ $reqdfields = explode(" ", "ipaddr subnet"); $reqdfieldsn = explode(",", "IP address,Subnet bit count"); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); if (($_POST['ipaddr'] && !is_ipaddr($_POST['ipaddr']))) { $input_errors[] = "A valid IP address must be specified."; } if (($_POST['subnet'] && !is_numeric($_POST['subnet']))) { $input_errors[] = "A valid subnet bit count must be specified."; } /* Wireless interface? */ if (isset($lancfg['wireless'])) { $wi_input_errors = wireless_config_post(); if ($wi_input_errors) { $input_errors = array_merge($input_errors, $wi_input_errors); } } if (!$input_errors) { if (($lancfg['ipaddr'] != $_POST['ipaddr']) || ($lancfg['subnet'] != $_POST['subnet'])) { update_if_changed("IP Address", &$lancfg['ipaddr'], $_POST['ipaddr']); update_if_changed("subnet", &$lancfg['subnet'], $_POST['subnet']); /* We'll need to reboot after this */ touch($d_sysrebootreqd_path); } if($_POST['bandwidth'] <> "" and $_POST['bandwidthtype'] <> "") { update_if_changed("bandwidth", &$lancfg['bandwidth'], $_POST['bandwidth']); update_if_changed("bandwidth type", &$lancfg['bandwidthtype'], $_POST['bandwidthtype']); } else { unset($lancfg['bandwidth']); unset($lancfg['bandwidthtype']); } $dhcpd_was_enabled = 0; if (isset($config['dhcpd']['enable'])) { unset($config['dhcpd']['enable']); $dhcpd_was_enabled = 1; $changedesc .= " DHCP disabled"; } write_config($changedesc); $savemsg = get_std_save_message(0); /* setup carp interfaces */ interfaces_carp_configure(); /* bring up carp interfaces */ interfaces_carp_bringup(); if ($dhcpd_was_enabled) $savemsg .= "
Note that the DHCP server has been disabled.
Please review its configuration " . "and enable it again prior to rebooting."; } } $pgtitle = "Interfaces: LAN"; include("head.inc"); ?>

IP address /
Bandwidth Management (Traffic Shaping)
Interface Bandwidth Speed
The bandwidth setting will define the speed of the interface for traffic shaping.
 
  Warning:
after you click "Save", you will need reboot your firewall for changes to take effect if you changed the IP address or subnet of this interface. You may also have to do one or more of the following steps before you can access your firewall again:
  • change the IP address of your computer
  • renew its DHCP lease
  • access the webGUI with the new IP address