Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jul 2011 10:20:02 -0700 (PDT)
From:      Unga <unga888@yahoo.com>
To:        freebsd-ipfw@freebsd.org, Fabian Wenk <fabian@wenks.ch>
Subject:   Re: ipfw fwd on FreeBSD 8.1, does it work?
Message-ID:  <1309886402.433.YahooMailClassic@web160111.mail.bf1.yahoo.com>
In-Reply-To: <4E1318EE.7020602@wenks.ch>

next in thread | previous in thread | raw e-mail | index | archive | help


--- On Tue, 7/5/11, Fabian Wenk <fabian@wenks.ch> wrote:

> From: Fabian Wenk <fabian@wenks.ch>
> Subject: Re: ipfw fwd on FreeBSD 8.1, does it work?
> To: freebsd-ipfw@freebsd.org
> Date: Tuesday, July 5, 2011, 10:00 PM
> Hello Unga
> 
> On 05.07.2011 12:47, Unga wrote:
> 
> > Following ipfw rule develop error indicated:
> > ipfw add 100 fwd 127.0.0.1,1234 tcp from any to any
> 1234 out via wlan0
> > 
> > Error:
> > ipfw: getsockopt(IP_FW_ADD): Invalid argument
> 
> Does your kernel have 'options IPFIREWALL_FORWARD' (if this
> is needed for 8.1, I still run at 7.x)?
> 
> Else try the rule like this:
> ipfw add 100 fwd 127.0.0.1 ip4 from me to any 1234 out via
> wlan0
> or:
> ipfw add 100 fwd 127.0.0.1 tcp from me to any 1234 out via
> wlan0
> 
> The fwd rule does only match the packets which match the
> rule 'ip4 from me to any 1234 out via wlan0' (me = alias for
> local IP addresses), so they will be directed to 127.0.0.1
> on the same destination port. Other packets not for
> destination port 1234 will just go out as usual.
> 
> 
Hi Fabian

Thanks for the reply.

The 'options IPFIREWALL_FORWARD' is already built in the custom kernel.

Both rules you suggested develop the same error:
ipfw: getsockopt(IP_FW_ADD): Invalid argument

Unga






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1309886402.433.YahooMailClassic>