summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-06-11 03:55:24 +0000
committerBill Marquette <billm@pfsense.org>2005-06-11 03:55:24 +0000
commitfe038cb6b97cf2621f45bc36429e0e3fc63df7bc (patch)
tree0f469f82c8ef946fada31581388ecef344f1ee1e /usr/local/www/firewall_rules_edit.php
parent3eb4f771863be8119d29123df5ff31119ea68153 (diff)
downloadpfsense-fe038cb6b97cf2621f45bc36429e0e3fc63df7bc.zip
pfsense-fe038cb6b97cf2621f45bc36429e0e3fc63df7bc.tar.gz
Grab default route as a gateway, interface might be dynamic
Diffstat (limited to 'usr/local/www/firewall_rules_edit.php')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 5bb48c6..ad67024 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -774,6 +774,9 @@ Hint: the difference between block and reject is that with reject, a packet (TCP
<?php
/* build a list of gateways */
$gateways = array();
+ exec("/sbin/route -n get default |/usr/bin/grep gateway", $defroute);
+ preg_match("/(\d+\.\d+\.\d+\.\d+)/", $defroute[0], $matches);
+ $gateways[] = $matches[1];
foreach($config['interfaces'] as $int) {
if($int['gateway'] <> "")
$gateways[]=$int['gateway'];
OpenPOWER on IntegriCloud