From owner-freebsd-ipfw@FreeBSD.ORG Tue Jul 5 10:59:58 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 5F09E1065670 for ; Tue, 5 Jul 2011 10:59:58 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: from nm29-vm0.bullet.mail.bf1.yahoo.com (nm29-vm0.bullet.mail.bf1.yahoo.com [98.139.213.166]) by mx1.freebsd.org (Postfix) with SMTP id DC6608FC0A for ; Tue, 5 Jul 2011 10:59:57 +0000 (UTC) Received: from [98.139.212.149] by nm29.bullet.mail.bf1.yahoo.com with NNFMP; 05 Jul 2011 10:47:02 -0000 Received: from [98.139.212.230] by tm6.bullet.mail.bf1.yahoo.com with NNFMP; 05 Jul 2011 10:47:02 -0000 Received: from [127.0.0.1] by omp1039.mail.bf1.yahoo.com with NNFMP; 05 Jul 2011 10:47:02 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 865648.45766.bm@omp1039.mail.bf1.yahoo.com Received: (qmail 10425 invoked by uid 60001); 5 Jul 2011 10:47:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1309862822; bh=sZefuMy5lGxQzQXR2nlutsPpimjJRHErGdmiBAtJzLY=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=VYbMGHyoxd5gFZuU8V4Clw90gtivDAw6EiPcgAb9gtMwS5mL9Ej7pclM1DRAHGBAvZozqspsyWn8MYNT3rIueP74r/P6cRF0GLZcjxGw3n9iykX3dhSgFH05emBFrF+LVKJbYv7NKyUMZTVCMlL+ecROgwA9mLHZZOXnFuJgqC4= 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:MIME-Version:Content-Type; b=ufWd6uWn/FHuNHw7RVYWZr8aoNX+aUnydF3DNt7cYSM8kDIhM3asgSb8DT8CQDFzDRaxLNYoXbJ3gV6hxxImzlYzOHWXSiW9upIf4Ecrsi+WKbQF/1rmgLSMEMnZM3diwH/J0VN1ZD+PUlqfTG9c00gd+DHkY67RLy0LwxgX6Qk=; X-YMail-OSG: GjwsKkgVM1lA3IOPaYLrYgSGARNrPYJvJ_NC8tlMHDbMnH0 o2R9f.Q_kNn103d0l84oRlWdG7FfPEq7MHm8LRkH7PcNuLh9uYZBN2tPPOvm E8v7xz8BtjWLb1kydJ57GzBUeYlGrwO93APqL7HwQKKw0vC725dLs2fX2Cmr 0oKbxxJ6fP_2yQZRrraXHE1KRlv9rW5g.h5nr5J7QqhzTBKjIf4Fi8sVvC7_ 604hwRuV3Ie4I4TxQNJctHtRsM4Kl9kM0Gh6ewUokbqiv245hk5ZPL_xtKOH c2dcYlTgWBCg.eyI_TVytjkDBp3UEd9yy2xriTPjKQdcCcGdUb.AskEBrmV1 XLWTIbfVJCmudfl6sC1cmV7LgfNt73_nHvlJsgCGiLXMWC0TACSb5igbolxB twao7XTko2k7b9_SneRmQxCO9Ql9NY2BJcpUCslfYQ7o0vbCKjT4l8Q-- Received: from [112.134.99.185] by web160107.mail.bf1.yahoo.com via HTTP; Tue, 05 Jul 2011 03:47:02 PDT X-Mailer: YahooMailClassic/14.0.3 YahooMailWebService/0.8.112.307740 Message-ID: <1309862822.4608.YahooMailClassic@web160107.mail.bf1.yahoo.com> Date: Tue, 5 Jul 2011 03:47:02 -0700 (PDT) From: Unga To: freebsd-ipfw@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: 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 10:59:58 -0000 Hi all 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 What I want to do is forward any packet going out of the computer to port 1234 forward back to 127.0.0.1:1234. There is a test daemon listening to port 1234. The wlan0 exists and used for all Internet traffic. The objective is to test a daemon. In actual practice the router is expected forward packets passing to port 1234 to this daemon. I have built the kernel with "options IPFIREWALL_FORWARD". This is FreeBSD 8.1. What's the error here? Is the rule incorrect? Does ipfw fwd work with FreeBSD 8.1? Can I forward packets generating in the computer back to the same computer with ipfw fwd? Many thanks in advance. Unga