Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Apr 2001 15:27:08 -0500 (CDT)
From:      Nick Rogness <nick@rogness.net>
To:        Andrei Cojocaru <acojocaru@hotmail.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: IPFW Rules (Port Forwarding)
Message-ID:  <Pine.BSF.4.21.0104151523300.61877-100000@cody.jharris.com>
In-Reply-To: <F175AmEaJswFCHOzyfy0000a51c@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 15 Apr 2001, Andrei Cojocaru wrote:

> I am trying to forward all packets destined to 216.126.10.210:80 (outside IP 
> of multi-homed host) to 192.168.0.4:80
> 
> this is the IPFW rule I made:
> 
> ipfw add 30 fwd192.168.0.4,80 tcp from any to 216.126.10.210 80
> 
> but I get an error when I try to add it I get this error:
> ipfw: getsockopt(IP_FW_ADD): Invalid argument


	You need to compile the kernel with 'options IPFIREWALL_FORWARD'.
	However, as you will see, this will not work the way you think.

	You should not be using ipfw fwd to do this.  This is a job
	for natd.  You are *changing* the actual src,dst address in
	the packets.  Natd allows you to do that...ipfw fwd does not.


Nick Rogness <nick@rogness.net>
 - Keep on Routing in a Free World...
 "FreeBSD: The Power to Serve!"


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0104151523300.61877-100000>