From owner-freebsd-questions@FreeBSD.ORG Tue May 13 19:34:43 2003 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 517B737B401 for ; Tue, 13 May 2003 19:34:43 -0700 (PDT) Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id D55A443FA3 for ; Tue, 13 May 2003 19:34:41 -0700 (PDT) (envelope-from freebsd-questions-local@be-well.no-ip.com) Received: from be-well.ilk.org (lowellg.ne.client2.attbi.com[24.147.188.198]) by attbi.com (sccrmhc02) with ESMTP id <2003051402344100200hb0hme>; Wed, 14 May 2003 02:34:41 +0000 Received: from be-well.ilk.org (lowellg.ne.client2.attbi.com [24.147.188.198] (may be forged)) by be-well.ilk.org (8.12.9/8.12.7) with ESMTP id h4E2YeuD045088; Tue, 13 May 2003 22:34:40 -0400 (EDT) (envelope-from freebsd-questions-local@be-well.no-ip.com) Received: (from lowell@localhost) by be-well.ilk.org (8.12.9/8.12.6/Submit) id h4E2Ye9Y045085; Tue, 13 May 2003 22:34:40 -0400 (EDT) X-Authentication-Warning: be-well.ilk.org: lowell set sender to freebsd-questions-local@be-well.ilk.org using -f Sender: lowell@be-well.no-ip.com To: Niklas Saers Mailinglistaccount References: <20030512124842.F32710@doriath.saers.com> From: Lowell Gilbert Date: 13 May 2003 22:34:40 -0400 In-Reply-To: <20030512124842.F32710@doriath.saers.com> Message-ID: <44addqi7cv.fsf@be-well.ilk.org> Lines: 33 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: questions@freebsd.org Subject: Re: SSH nat-forwarded X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 02:34:43 -0000 Niklas Saers Mailinglistaccount writes: > Hi, > I've got a firewall that forwards ports to SSH-ports on boxes it protects. > This has been good for all 4-STABLE boxes, but I've recently put up a > CURRENT box. I can SSH to the firewall and from the firewall to the > CURRENT box, but I do not get a proper connection when having it forwarded > through the firewall. > > Let's say my external box 'ext' is on 193.1.2.3, my firewall 'fw' is on > 193.2.2.1 and my internal CURRENT-box on 192.168.5.1 > > 'fw' masquerades using > "/sbin/natd -interface fxp0 -redirect_port 192.168.5.1:22 5051" > > and "firewall": > ipfw add divert 8668 ip from any to any via fxp0 > ipfw add allow ip from any to any > > from 'fw' "telnet 192.168.5.1 22" gives the classic "SSH-1.99"-etc > while from 'ext' "telnet 192.2.2.1 5051" gives no greeting at all. It > listens and terminates the connection after a short while. > > Any suggestions to why ssh doesn't connect correctly? I've forwarded other > ports to other services on the same box and it works flawlessly. Thus I > suspect that 'sshd' understands I've forwarded this connection and doesn't > like it the least bit. Can I turn of this hypersensitivity? Actually, it sounds more like the packets are getting dropped inside somewhere. Check the traffic on the inside link to see. [Are you sure you can do without the "tcp" specifier right after the "-redirect_port" option?]