ipfw fwd on FreeBSD 8.1, does it work?
Unga
unga888 at yahoo.com
Tue Jul 5 17:20:04 UTC 2011
--- On Tue, 7/5/11, Fabian Wenk <fabian at wenks.ch> wrote:
> From: Fabian Wenk <fabian at wenks.ch>
> Subject: Re: ipfw fwd on FreeBSD 8.1, does it work?
> To: freebsd-ipfw at 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
More information about the freebsd-ipfw
mailing list