. 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. */ $pgtitle = "Firewall: Countryblock - Interfaces"; require("guiconfig.inc"); /* In this file, "port" refers to the physical port name, while "interface" refers to LAN, WAN, or OPTn. */ /* get list without VLAN interfaces */ $portlist = get_interface_list(); /* add VLAN interfaces */ if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) { $i = 0; foreach ($config['vlans']['vlan'] as $vlan) { $portlist['vlan' . $i] = $vlan; $portlist['vlan' . $i]['isvlan'] = true; $i++; } } if ($_POST) { unset($input_errors); /* input validation */ /* Build a list of the port names so we can see how the interfaces map */ $portifmap = array(); foreach ($portlist as $portname => $portinfo) $portifmap[$portname] = array(); /* Go through the list of ports selected by the user, build a list of port-to-interface mappings in portifmap */ conf_mount_rw(); $myFile = "interfaces.txt"; $fh = fopen($myFile, 'w+'); foreach ($_POST as $ifname => $ifport) { //echo $ifname; //echo "
"; fwrite($fh, $ifname . "\n"); //if (($ifname == 'lan') || ($ifname == 'wan') || (substr($ifname, 0, 3) == 'opt')) //$portifmap[$ifport][] = strtoupper($ifname); } conf_mount_ro(); if (!$input_errors) { /* No errors detected, so update the config */ foreach ($_POST as $ifname => $ifport) { if (($ifname == 'lan') || ($ifname == 'wan') || (substr($ifname, 0, 3) == 'opt')) { } } $savemsg = get_std_save_message($retval); } } include("head.inc"); ?>

Here to go back"); ?>
$iface): if ($iface['descr']) $ifdescr = $iface['descr']; else $ifdescr = strtoupper($ifname); ?>
Interface Selected  
$portinfo): ?> $portname"; else echo "$portname"; } ?>


Select the interfaces you want secured. It's recommended to select all interfaces.

Default: All interfaces are seleted.