firewall: npt alignment

NPT is a kind of abandoned feature that had a custom kernel patch.
I tried to trace the origin through OpenBSD, but their pf(4) since
switched away from separate binat rules in the last known form like
it is still in FreeBSD.

Furthermore, the original GUI commit looks odd in that it tries to
push the same traffic downwards that would match in the former line,
which acutally points upwards.  It's either that or completely zapping
the line.  For now, repair the rules reload by trying to retain the
spirit of what it tries to achieve and wait for further feedback.

This late bug report also suggests that virtually nobody uses NPT
today since we've had no upstream reports since at least 15.7 was
out.

PR: https://forum.opnsense.org/index.php?topic=3076.0
This commit is contained in:
Franco Fichtner 2016-05-22 20:11:18 +02:00
parent b3049270f0
commit 39eed8a108

View File

@ -1707,7 +1707,7 @@ function filter_nat_rules_generate(&$FilterIflist)
$natif = $FilterIflist[$natif]['descr'];
$natrules .= "binat on \${$natif} from {$srcaddr} to any -> {$dstaddr}\n";
$natrules .= "binat on \${$natif} from any to {$dstaddr} -> {$srcaddr}\n";
$natrules .= "binat on \${$natif} from {$dstaddr} to any -> {$srcaddr}\n";
}
}