ipfw fwd to localhost

Andre Oppermann andre at freebsd.org
Thu Apr 21 10:37:57 PDT 2005


Karim Fodil-Lemelin wrote:
> 
> Hi,
> 
>     I just did a cvsup of RELENG_5 and got some problem doing forwarding
> to localhost using a rule like this:
> 
> ipfw add fwd 127.0.0.1,1234 tcp from any to any in via re1
> 
>     I have those options in my kernel config:
> 
> options   IPFIREWALL
> options   IPFIREWALL_FORWARD_EXTENDED
> options   IPFIREWALL_DEFAULT_TO_ACCEPT
> 
>     I understand that 5.4 is using ipfw2 by default so I did not add
> IPFW2="YES" in /etc/make.conf and used the ipfw that I had installed
> with 5.3.
> 
> The error I get is somehting like setsockopt (IP_FW_ADD) invalid
> argument when issuing the ipfw call.

You need this option too:

 options   IPFIREWALL_FORWARD

-- 
Andre


More information about the freebsd-net mailing list