NAT question

Mason Loring Bliss mason at blisses.org
Sat Feb 21 18:28:18 UTC 2015


On Sat, Feb 21, 2015 at 12:46:04AM -0500, Paul A. Procacci wrote:

> There is a section in ipfw(8) labeled: 'NETWORK ADDRESS TRANSLATION (NAT)'
> In that section it details how to bind a nat instance to an ip address.
> (Namely, the ip argument)

I'm not sure how I missed that there can be multiple NAT instances, seeing
that they're numbered. =cough=


> Then you can use ipfw to throw packets at whatever nat instance you want.

It looks like I do this with

    ipfw add nat <number> all from <internal> to any

to tie <internal> to the external address I'll later specify with "config ip
foo", if I'm reading this correctly. It'll be easy enough to test.

Another question comes up - to do DNAT and pass inbound connections back to
different hosts depending on which external address is used, do I want to set
up something like

    ipfw add nat <number> all from any to <external>

...or do I want to do something with the "reverse" config element? the man
page is light on description for "reverse".

Anyway, thank you for orienting me.

-- 
Mason Loring Bliss   ((  "In the drowsy dark cave of the mind dreams
mason at blisses.org     ))  build  their nest  with fragments  dropped
http://blisses.org/  ((   from day's caravan." - Rabindranath Tagore


More information about the freebsd-net mailing list