From owner-freebsd-questions@FreeBSD.ORG Tue Oct 4 04:13:46 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B01FE16A41F for ; Tue, 4 Oct 2005 04:13:46 +0000 (GMT) (envelope-from jhfoo@nexlabs.com) Received: from tin.colossus.net (tin.colossus.net [216.121.224.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7378843D45 for ; Tue, 4 Oct 2005 04:13:46 +0000 (GMT) (envelope-from jhfoo@nexlabs.com) Received: from nexpc (243.210-193-15.adsl.qala.com.sg [210.193.15.243]) by tin.colossus.net (8.9.3p2/8.9.3) with SMTP id UAA17008 for ; Mon, 3 Oct 2005 20:14:52 -0700 Message-ID: <010a01c5c89a$f4234c80$c801a8c0@nexpc> From: "Foo Ji-Haw" To: Date: Tue, 4 Oct 2005 12:20:24 +0800 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Need help: fwd on ipfw 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, 04 Oct 2005 04:13:46 -0000 Hi all, I really need your help on this if you can... I am trying to put set up port forwarding on my machine. So far the = usual 'add allow' and 'add deny' rules work perfectly. The most = important rule which bugs me is the 'add fwd' rule, which the snippet = below shows: ipfw add fwd 192.168.0.4,80 tcp from 10.10.10.0 to any 80 When I try to enter this on the command line, I get the following error: ipfw: getsockopt(IP_FW_ADD): Invalid Argument=20 I tried researching the web. Some mention the error only upon = recompiling kernels. But I am using the standard 5.4 product release = as-is. My firewall rules in rc.conf are as follows: firewall_enable=3D"YES" firewall_logging=3D"YES" I also have this line in dmesg: ipfw2 initialized, divert disabled, rule-based forwarding disabled, = default to deny, logging disabled I see that 'rule-based forwarding' is disabled. Is this what caused the = error? How can I enable it? I can't find the details on the Handbook. Please advise. Thanks.