diff options
author | Evgeny Yurchenko <ey@tm-k.com> | 2011-05-30 22:10:36 -0400 |
---|---|---|
committer | Evgeny Yurchenko <ey@tm-k.com> | 2011-05-30 22:10:36 -0400 |
commit | edb2a3dab4833fa024828f3150cdcc1521ea1b48 (patch) | |
tree | 797d672d7496a635e79fbb908268d28f269487b6 /usr | |
parent | a3d58a12bf8a153c490f6946e796fb79a2e6957e (diff) | |
download | pfsense-edb2a3dab4833fa024828f3150cdcc1521ea1b48.zip pfsense-edb2a3dab4833fa024828f3150cdcc1521ea1b48.tar.gz |
Bug#1528. Automatically create outbound NAT rules on WAN for localhost when switching to manual.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/firewall_nat_out.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php index e6b5900..b8506d8 100755 --- a/usr/local/www/firewall_nat_out.php +++ b/usr/local/www/firewall_nat_out.php @@ -125,6 +125,17 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") { $natent['natport'] = ""; $a_out[] = $natent; + $natent = array(); + $natent['source']['network'] = "127.0.0.0/8"; + $natent['dstport'] = ""; + $natent['descr'] = sprintf(gettext('Auto created rule for localhost to %1$s'),$ifdesc2); + $natent['target'] = ""; + $natent['interface'] = $if2; + $natent['destination']['any'] = true; + $natent['staticnatport'] = false; + $natent['natport'] = "1024:65535"; + $a_out[] = $natent; + /* PPTP subnet */ if (($config['pptpd']['mode'] == "server") && is_private_ip($config['pptpd']['remoteip'])) { $pptp_subnets = ip_range_to_subnet_array($config['pptpd']['remoteip'], long2ip32(ip2long($config['pptpd']['remoteip'])+$config['pptpd']['n_pptp_units'])); |