NAT in ipfw

Ahsan Barkati ahsanb at freebsd.org
Wed Jul 3 16:41:59 UTC 2019


Hi,
I have been trying to set up NAT using ipfw's in-kernel NAT. I want to
configure NAT in one of the jails (say A) and let other jail (say B) be
behind this NAT and be able to ping the host.


ipfw -q add 14 nat 123 all from any to any via ${epair_host_nat}b out
ipfw -q add 15 nat 123 all from any to me via ${epair_host_nat}b in

epair_host_nat is the name of the epair. One of the interfaces of this
epair is associated with the host and other with the jail A.

Jail B is connected to jail A via another epair. And I have added a route
in jail B for the host IP.

But, I am not able to ping the host from jail B. Please let me know if I am
doing something wrong and also suggest me a way to debug this.

Thanks

-Ahsan


More information about the freebsd-ipfw mailing list