From owner-freebsd-questions@FreeBSD.ORG Tue Jul 25 17:04:02 2006 Return-Path: X-Original-To: questions@freebsd.org 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 AA5DE16A4DA for ; Tue, 25 Jul 2006 17:04:02 +0000 (UTC) (envelope-from cotharyus@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64BF943D45 for ; Tue, 25 Jul 2006 17:04:00 +0000 (GMT) (envelope-from cotharyus@gmail.com) Received: by nf-out-0910.google.com with SMTP id n29so287127nfc for ; Tue, 25 Jul 2006 10:04:00 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=o/Khr6ryTtasVSsPguOlQ65+IgdWzy4PhQ6eEb0D5wwjNuT04EBfKWbMWoz4kEtEerWdQVutQ767KjzFTspfAVPGEE9PrK4I8+5a1dcFb4lSpQtDUfigYs0nw7h/rqJHgxA2bwJjWM291ZWrD+rEKoRn+sBrjgVjg1ZPbc0cPbE= Received: by 10.48.42.1 with SMTP id p1mr962654nfp; Tue, 25 Jul 2006 10:03:59 -0700 (PDT) Received: by 10.49.31.14 with HTTP; Tue, 25 Jul 2006 10:03:59 -0700 (PDT) Message-ID: <715841970607251003o1d358d3dl894291f50a0b8053@mail.gmail.com> Date: Tue, 25 Jul 2006 12:03:59 -0500 From: Drew To: questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: ssh tunnel - remote access through nat X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jul 2006 17:04:02 -0000 Hi, I've got a box that's nat'd out to the internet. It is occassionally neccessary for me to access this box remotely. The obvious answer is: ssh -R 7777:localhost:22 remote.box cat run from the nat'd box where remote box is a place I pretty much always have access too from anywhere, anytime. The problem is that the connection between these two boxes is famously unreliable - so I need to ensure that this connection stays available. Unfortunately, the procedure for this is not obvious to me. I've thought about a cron job, as the connection would simply fail if it couldn't bind to 7777 on the remote box to listen. But I'm thinking there has to be something that makes more sense. Suggestions? Feedback? Thanks in advance for any pointers.