Re: NAT problems 14.3+
- In reply to: Rob Bloemers : "Re: NAT problems 14.3+"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 04 May 2026 16:50:18 UTC
n 5/4/2026 10:28, Rob Bloemers wrote:
> FWIW
>
> Avoiding in-kernel IPFW NAT and using the rc.firewall / type open with natd in userspace, nat seems to function fine for my jails.
>
>> On 3 May 2026, at 12:54, Rob Bloemers <bsd@connectedserver.com> wrote:
>>
>> I've tried this setup now on three different machines at three different providers, and each time my simple NAT breaks and i'm still clueless on the why. And it prevents me from moving quite a few machines from 14.3 to newer releases. What works fine on 14.3 breaks on 14.4 or newer, which even worse results on 15.0. Even the ipfw nat example from the freebsd manual does not work. I'm sure i cant be the only one with this issue?
>>
>> Really hope somebody can replicate this for him/herself to confirm this and/or give me a solution for my problem.
>>
>> Kind Regards
>> Rob
Precisely what is not working on 14.4? I've missed some of this but
that message caught my eye.
I ask because:
FreeBSD 14.4-STABLE (GENERIC) #0 stable/14-n273840-e5ed09ffd592-dirty:
Thu Mar 26 14:22:11 EDT 2026
IpGW External gateway
And I am using in-kernel ipfw NAT (config file is in
/usr/local/etc/ipfw.local and is quite-extensive as the configuration
here is a bit complex):
...
#
# Set up interfaces and set abbreviations
#
iif="ix1"
oif="ix0"
pubif="ix1.3"
#
# Declare networks
# First, all internal addresses are on 192.168.0.0/16.
#
inet="192.168.0.0/16"
# Reassemble UDP packets before continuing so fragmented ones work
#
${fwcmd} add 50 reass all from any to any in
....
${fwcmd} nat 100 config if ${oif} log same_ports reset
redirect_port ......(many)
....
#
# Now pick up all *outbound* packets that originated from an inside address
# (including IPSEC tunneled stuff) and put them through NAT. We then have
# a packet with a local source address and we can allow it to be sent.
# Therefore, if the packet is outbound let it pass and be done with it.
#
${fwcmd} add 8002 nat 100 ip4 from 192.168.0.0/16 to any xmit
${oif}
${fwcmd} add 8006 deny log ip4 from 192.168.0.0/16 to any xmit
${oif}
All works as expected and when I went from 14.3 -> 14.4 I did not have
to make any adjustments.
I've not yet moved to 15.x on this box but will somewhere in the
not-so-distant future.
--
Karl Denninger
karl@denninger.net
/The Market Ticker/
/[S/MIME encrypted email preferred]/