From owner-freebsd-questions@FreeBSD.ORG Wed Apr 21 02:46:31 2004 Return-Path: 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 A351A16A4CE for ; Wed, 21 Apr 2004 02:46:31 -0700 (PDT) Received: from unsane.co.uk (unsane.co.uk [82.152.23.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id 029A143D3F for ; Wed, 21 Apr 2004 02:46:31 -0700 (PDT) (envelope-from jhary@unsane.co.uk) Received: from unsane.co.uk (localhost.unsane.co.uk [127.0.0.1]) by unsane.co.uk (8.12.11/8.12.10) with ESMTP id i3L9jmD6023047; Wed, 21 Apr 2004 10:45:48 +0100 (BST) (envelope-from jhary@unsane.co.uk) Received: from localhost (jhary@localhost) by unsane.co.uk (8.12.11/8.12.10/Submit) with ESMTP id i3L9jmgZ023044; Wed, 21 Apr 2004 10:45:48 +0100 (BST) (envelope-from jhary@unsane.co.uk) Date: Wed, 21 Apr 2004 10:45:48 +0100 (BST) From: Vince Hoffman To: Chiang Seng Chang In-Reply-To: <20040420204553.GA3225@europa.ctzen.com> Message-ID: <20040421102544.E22773@unsane.co.uk> References: <20040420204553.GA3225@europa.ctzen.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-questions@freebsd.org Subject: Re: iptables to ipfw X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2004 09:46:31 -0000 On Tue, 20 Apr 2004, Chiang Seng Chang wrote: > hi, > > anyone knows what is the equivalent of these in ipfw ? > > iptables -t nat -A POSTROUTING -s 10.1.0.2/32 -o eth0 -j MASQUERADE > iptables -t nat -A POSTROUTING -s 10.50.4.0/22 -o eth0 -j MASQUERADE > > it's for openvpn using tun0. > > i have setup natd using: > > ipfw add divert natd all from any to any via dc0 > > and it is working. > > but i would like to be more specific so that i am not nat'ing unnecessary. > > tried without success: > > ipfw add divert natd all from 10.1.0.1/32 to any via dc0 > ipfw add divert natd all from 10.50.4.0/22 to any via dc0 > try (from natd man page) -unregistered_only | -u Only alter outgoing packets with an unregistered source address. According to RFC 1918, unregistered source addresses are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. as an extra flag to natd > thanks and regards. > > -cs > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >