summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_nat_out.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-06-21 14:44:30 +0000
committerErmal Luçi <eri@pfsense.org>2008-06-21 14:44:30 +0000
commitcbe3ea96403e554822bd4675cb5565d20ab55fa7 (patch)
treec96401ee12ee200acbd111194e108cc6c92b4ac2 /usr/local/www/firewall_nat_out.php
parent1ad25a3ffbf9ad226d8cb3463ef46c2ff82ad936 (diff)
downloadpfsense-cbe3ea96403e554822bd4675cb5565d20ab55fa7.zip
pfsense-cbe3ea96403e554822bd4675cb5565d20ab55fa7.tar.gz
Continue interface improvements
Diffstat (limited to 'usr/local/www/firewall_nat_out.php')
-rwxr-xr-xusr/local/www/firewall_nat_out.php18
1 files changed, 4 insertions, 14 deletions
diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php
index 9cfffcd..99fc3f7 100755
--- a/usr/local/www/firewall_nat_out.php
+++ b/usr/local/www/firewall_nat_out.php
@@ -79,25 +79,15 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
* user has enabled advanced outbound nat -- lets automatically create entries
* for all of the interfaces to make life easier on the pip-o-chap
*/
- $ifdescrs = array('lan');
- for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++)
- $ifdescrs[] = "opt" . $j;
- foreach($ifdescrs as $if) {
- if($if <> "lan" and $if <> "wan") {
- /* interface is an optional. is it enabled? */
- if(!isset($config['interfaces'][$if]['enabled'])) {
- continue;
- }
- }
+ $ifdescrs = get_configured_interface_with_descr();
+
+ foreach($ifdescrs as $if => $ifdesc) {
$natent = array();
$osn = gen_subnet($config['interfaces'][$if]['ipaddr'],
$config['interfaces'][$if]['subnet']);
$natent['source']['network'] = $osn . "/" . $config['interfaces'][$if]['subnet'];
$natent['sourceport'] = "";
- $int_description = $config['interfaces'][$if]['descr'];
- if($if == "lan")
- $int_description = "LAN";
- $natent['descr'] = "Auto created rule for {$int_description}";
+ $natent['descr'] = "Auto created rule for {$ifdesc}";
$natent['target'] = "";
$natent['interface'] = "wan";
$natent['destination']['any'] = true;
OpenPOWER on IntegriCloud