From owner-freebsd-questions Sun Jan 13 1: 6:41 2002 Delivered-To: freebsd-questions@freebsd.org Received: from HAL9000.wox.org (as3-4-150.HIP.Berkeley.EDU [136.152.196.136]) by hub.freebsd.org (Postfix) with ESMTP id 5971037B423 for ; Sun, 13 Jan 2002 01:06:26 -0800 (PST) Received: (from dschultz@localhost) by HAL9000.wox.org (8.11.3/8.11.3) id g0D8UuV06145; Sun, 13 Jan 2002 00:30:56 -0800 (PST) (envelope-from dschultz) Date: Sun, 13 Jan 2002 00:30:56 -0800 From: David Schultz To: Anthony Schneider Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Natd and port forwarding Message-ID: <20020113003056.B5351@HAL9000.wox.org> Mail-Followup-To: Anthony Schneider , freebsd-questions@FreeBSD.ORG References: <20020109172104.A6621@mail.slc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020109172104.A6621@mail.slc.edu>; from aschneid@mail.slc.edu on Wed, Jan 09, 2002 at 05:21:05PM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thus spake Anthony Schneider : > So, I would like to be able to allow connections made to machine A > on some port (let's say port 4040) to be forwarded seamlessly to > port 80 on machine B. A is the acting gateway for my LAN, and B is > a LAN client (internal ip address). What I have read states that I > should have natd run as such: > natd -n xl0 -redirect_port tcp client.B.ip:80 4040 > However, if I telnet to port 4040 on machine A (which is running > natd) I get a connection refused error. Any suggestions? I have > even tried adding > ipfw add divert natd all from any to any via xl0 > which (sigh) doesn't do the trick. Add ipfw add pass all from any to any _after_ your divert rule to make sure that packets are getting through after translation. If that fixes the problem and you want a real firewall, I suggest basing it roughly on the `simple' ruleset in `/etc/rc.firewall'. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message