Question about ipfw, natd and port forwarding.

Jeff Penn jeff+list+news at jrpenn.demon.co.uk
Sun Mar 6 11:17:11 PST 2005


Deling Ren <lg+freebsd at home.homeunix.org>:
> Hi all, I am trying to setup a NAT box for my home network on freebsd 5.3.
> I am using ipfw and natd. I already got nat running but I am having
> problem with port forwarding. I am trying to forward port 80 on the nat
> box to an internal machine (192.168.0.7). I have the following as part of

> I have no problem connecting port 80 on the nat box from outside. But as I
> added stateful ipfw rules, it stops working. Running nmap from outside
> says port 80 is filtered. I am not sure how to configure the rules to
> enable port forwarding. Any help will be appreciated. Thanks.

> 00005 allow ip from any to any via $iif

This is a limitation of ipfw, nat cannot be used with keep-state rules.
If $iif above is ppp you can get around this by configuring ppp(8) to
perform nat.

Jeff



More information about the freebsd-questions mailing list