From owner-freebsd-questions@FreeBSD.ORG Tue Jul 5 09:14:35 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58B5B106564A for ; Tue, 5 Jul 2011 09:14:35 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id CBF868FC16 for ; Tue, 5 Jul 2011 09:14:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id p659EWoa038809; Tue, 5 Jul 2011 19:14:33 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Tue, 5 Jul 2011 19:14:32 +1000 (EST) From: Ian Smith To: Unga In-Reply-To: <20110705042728.409431065745@hub.freebsd.org> Message-ID: <20110705184236.U84785@sola.nimnet.asn.au> References: <20110705042728.409431065745@hub.freebsd.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1870234500-1309857272=:84785" Cc: freebsd-questions@freebsd.org Subject: Re: ipfw: getsockopt(IP_FW_ADD): Invalid argument X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2011 09:14:35 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1870234500-1309857272=:84785 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT In freebsd-questions Digest, Vol 370, Issue 2, Message: 14 On Mon, 4 Jul 2011 09:11:07 -0700 (PDT) Unga wrote: > --- On Mon, 7/4/11, Unga wrote: > > > From: Unga > > Subject: ipfw: getsockopt(IP_FW_ADD): Invalid argument > > To: freebsd-questions@freebsd.org > > Date: Monday, July 4, 2011, 11:48 AM > > Hi all > > > > Following ipfw rule develop error indicated in the subject > > line: > > ipfw add 100 fwd 127.0.0.1,1234 tcp from any to any 1234 > > out via wlan0 > > > > What I want to do is forward any packet going to port 1234 > > to 127.0.0.1:1234. > > > > I have built the kernel with "options      > >    IPFIREWALL_FORWARD". > > > > What's the error here? Is the rule incorrect? > > > > This is FreeBSD 8.1. > > > > Many thanks in advance. > > > > Unga > > > > Does anybody successfully use the "ipfw fwd"? If so in which FreeBSD version? Not I, but many do. On the face of it the rule looks correct. Do you have a TCP service running on localhost:1234 ? Does wlan0 exist? You may do better posting to the freebsd-ipfw list, with more information. cheers, Ian --0-1870234500-1309857272=:84785--