From owner-freebsd-ipfw@FreeBSD.ORG Tue Jul 5 17:20:04 2011 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C285106564A for ; Tue, 5 Jul 2011 17:20:04 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: from nm22-vm0.bullet.mail.bf1.yahoo.com (nm22-vm0.bullet.mail.bf1.yahoo.com [98.139.212.126]) by mx1.freebsd.org (Postfix) with SMTP id 14ED78FC08 for ; Tue, 5 Jul 2011 17:20:03 +0000 (UTC) Received: from [98.139.212.144] by nm22.bullet.mail.bf1.yahoo.com with NNFMP; 05 Jul 2011 17:20:03 -0000 Received: from [98.139.212.200] by tm1.bullet.mail.bf1.yahoo.com with NNFMP; 05 Jul 2011 17:20:03 -0000 Received: from [127.0.0.1] by omp1009.mail.bf1.yahoo.com with NNFMP; 05 Jul 2011 17:20:03 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 386162.84113.bm@omp1009.mail.bf1.yahoo.com Received: (qmail 837 invoked by uid 60001); 5 Jul 2011 17:20:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1309886403; bh=uIaQySpGsjEHW2uNQVvu1HjArLb2ju+wbVd+ELR5bS8=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=BxtZfTllwX3V/LnY4YMBOjsOqP3dzSgByhLP7AWzjygQvj88t9dyJVfM89QYO+G8AhzT1pyLjvNQo7dyicE5IcpJ3Vs0YnC726NiYt792qxgUmRXEb5s0p76QAgCZ/1X3dMCxwchXyZVqP2+X4IjaLln2KIXKjFAB9ngAc4IN9w= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=XQANcXC+BL/47CGNx9NXYIVIc+uDifOYhRb3dJUDGg8e8ZI6zs6sa7MufHkPDv61S+Vyl6CzmA+JILRvX4Mrt6ZU8Lp4/F73ANpAc6McHvgbPcCBZVkDxWGMmjekGt4blh3LYO10spUhwqEV0clWRkf0l4QuOs20KDYVnHXAKQw=; X-YMail-OSG: hicmhucVM1n5LA07GzydhQGjvp0o_FFCnuA1Y3l_dnEiGgu BlyyHyqwLjPW.ZsFyfNyJBvWsuoCw9YUx_BYe1EnMT6dBn2r_7Rfdib6rTU2 jZbxmT3v0d_E6q7fBrb6ks2Kfd5G.7qxd.hy48fk8V3Frh6R9lf4O.dFsYlQ qbnh2VwRloReK9.betwDoDVS2Q3kZgwxBmHEHLw6XbAldfv8ihAYs.yZaKZW q1NjiONJtDvghYyQWafOAE2XIuhwHW96qXY84IvSjvOPL5pv.QIprYzcloze xdE8c93TqX81OpvVdFWI9Le3waiAtaDi3enOTHi8cCX3iixcSfjpm25fBE1s sUJ4t5tSCt_BNFyYe7Isf0znHHcBZJmR7PUrocGkJWsVgDFWvgqsh1fhNWKO QbkdvaJIaLW5ylENk_w-- Received: from [112.134.99.185] by web160111.mail.bf1.yahoo.com via HTTP; Tue, 05 Jul 2011 10:20:02 PDT X-Mailer: YahooMailClassic/14.0.3 YahooMailWebService/0.8.112.307740 Message-ID: <1309886402.433.YahooMailClassic@web160111.mail.bf1.yahoo.com> Date: Tue, 5 Jul 2011 10:20:02 -0700 (PDT) From: Unga To: freebsd-ipfw@freebsd.org, Fabian Wenk In-Reply-To: <4E1318EE.7020602@wenks.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Subject: Re: ipfw fwd on FreeBSD 8.1, does it work? X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2011 17:20:04 -0000 --- On Tue, 7/5/11, Fabian Wenk wrote: > From: Fabian Wenk > 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