From owner-freebsd-net@FreeBSD.ORG Wed Nov 3 19:11:48 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D3F1416A4CE for ; Wed, 3 Nov 2004 19:11:48 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id C937A43D1F for ; Wed, 3 Nov 2004 19:11:47 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id F08727A403; Wed, 3 Nov 2004 11:11:46 -0800 (PST) Message-ID: <41892D72.10203@elischer.org> Date: Wed, 03 Nov 2004 11:11:46 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: Erik Trulsson References: <20041103003630.GA51913@mind.net> <20041103011615.GA68454@falcon.midgard.homeip.net> In-Reply-To: <20041103011615.GA68454@falcon.midgard.homeip.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-net@freebsd.org cc: John Fox Subject: Re: Simple port forwarding question X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2004 19:11:48 -0000 Erik Trulsson wrote: >On Tue, Nov 02, 2004 at 04:36:30PM -0800, John Fox wrote: > > >>Hi, folks. >> >>I'm experimenting, trying to setup a situation where connections >>to port 25 on machine A are forwarded to port 25 on machine B. >>I've read the ipfw manpage and it looks as though what I'm doing >>is correct. >> >> >>The IPFW rules on machine A are: >> 00100 fwd machineB tcp from any to any 25 >> 65535 allow ip from any to any >> >>And there is a sendmail listening on B's port 25. >> >>But when I telnet to machine A's port 25, all I get is >>a perpetual "Trying" message that just sits there. >> >> > >Don't use "fwd" for this - it doesn't work that way (for one thing B is >unlikely to handle an IP-packet that is still adressed to A.) > >Use natd and the '-redirect_port' option to natd instead - that works. > you can use ipfw fwd IF you also run it on the target machine to "capture/accept" the foreign packet. Otherwise teh packet will be forwarded back to it's stated destination (or dropped). > > > > > >