Date: Tue, 05 Jul 2011 16:00:14 +0200 From: Fabian Wenk <fabian@wenks.ch> To: freebsd-ipfw@freebsd.org Subject: Re: ipfw fwd on FreeBSD 8.1, does it work? Message-ID: <4E1318EE.7020602@wenks.ch> In-Reply-To: <1309862822.4608.YahooMailClassic@web160107.mail.bf1.yahoo.com> References: <1309862822.4608.YahooMailClassic@web160107.mail.bf1.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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. bye Fabian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E1318EE.7020602>