mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Removed some redundant/obsolete code that is superceded by the new NAT reflection code.
This commit is contained in:
parent
e9d8ecf21c
commit
b06be62974
@ -1220,14 +1220,6 @@ function filter_nat_rules_generate() {
|
||||
$natrules .= "{$nordr}rdr on {$rdr_if_list} proto {$protocol} from {$srcaddr} to {$dstaddr_reflect}" . ($nordr == "" ? " -> {$target}{$localport}\n" : "\n");
|
||||
}
|
||||
|
||||
/* Does this rule redirect back to a internal host? */
|
||||
if(isset($rule['destination']['any']) && !interface_has_gateway($rule['interface']) && !isset($rule['nordr'])) {
|
||||
$rule_interface_ip = find_interface_ip($natif);
|
||||
$rule_interface_subnet = find_interface_subnet($natif);
|
||||
$rule_subnet = gen_subnet($rule_interface_ip, $rule_interface_subnet);
|
||||
$natrules .= "no nat on {$natif} proto tcp from ({$natif}) to {$rule_subnet}/{$rule_interface_subnet}\n";
|
||||
$natrules .= "nat on {$natif} proto tcp from {$rule_subnet}/{$rule_interface_subnet} to {$target} port {$dstport[0]} -> ({$natif})\n";
|
||||
}
|
||||
$nat_if_list[] = $natif;
|
||||
if(!isset($rule['nordr']))
|
||||
$natrules .= filter_generate_reflection_nat($rule, $nat_if_list, $protocol, "{$target}{$localport_nat}", $target_ip);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user