Created attachment 175361 [details] Proposed patch It is very difficult to get ipfw nat to work with stateful firewall (keep-state and check-state) in multi pass mode. The issue is that the state rules have to come after the nat rules. This makes keep-state see the external IP while check-state sees the internal IP and it doesn't work. Easier just to use single pass. Unfortunately you can't use single pass with certain netgraph nodes like tcpmss. The packets need to come back. So I propose we add an additional net.inet.ip.fw.one_pass_nat knob to enable one pass nat when net.inet.ip.fw.one_pass is set to 0 for netgraph, pipes and queues.
Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>