From 8950f203ec1baa269d2fdcf493f841cf1aa87379 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 24 Jun 2005 19:44:54 +0000 Subject: Automatically take into account multi-wan support. --- usr/local/www/firewall_nat_out.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php index 1075351..43f41ed 100755 --- a/usr/local/www/firewall_nat_out.php +++ b/usr/local/www/firewall_nat_out.php @@ -103,6 +103,9 @@ if (isset($_POST['save'])) { $natent['descr'] = "Auto created rule for {$if}"; $natent['target'] = ""; $natent['interface'] = "wan"; + /* if a gateway is setup on this interface, use it */ + if($config['interfaces'][$if]['gateway'] <> "") + $natent['interface'] = $if; $natent['destination']['any'] = true; $natent['natport'] = ""; $a_out[] = $natent; -- cgit v1.1