Some questions about in-kernel NAT

Ian Smith smithi at nimnet.asn.au
Wed Mar 8 16:36:31 UTC 2017


On Wed, 8 Mar 2017 16:52:36 +0100, Andrea Venturoli wrote:

Just on one point:

 > Second question:
 > _ if I issue "ipfw nat 2 config if re0", I'll see the output "ipfw nat 2
 > config if re0";
 > _ if I issue "ipfw nat 2 config ip 192.168.0.1", I'll see the output "ipfw
 > nat 2 config ip 192.168.0.1";
 > _ however if I issue "ipfw nat 2 config if re0 ip 192.168.0.1", output will
 > be "ipfw nat 2 config if re0".
 > Does this mean the "ip" part was ignored? Are "if" and "ip" mutually
 > exclusive?

Yes, they are.

 > I don't think this is mentioned in the man page...

No, it's not.  The NAT description is pretty terse, virtually assuming 
familiarity with predecessor natd(8), which is usually worth referring 
to for greater detail; it mostly matches funtionality 1:1 .. see:
    -alias_address | -a address
and
    -interface | -n interface
which clarify that you need to specify one or the other.

cheers, Ian


More information about the freebsd-net mailing list