From owner-freebsd-questions Wed Oct 9 10:43:17 2002 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 9D42537B401 for ; Wed, 9 Oct 2002 10:43:16 -0700 (PDT) Received: from mail.speakeasy.net (mail15.speakeasy.net [216.254.0.215]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B9D243E4A for ; Wed, 9 Oct 2002 10:43:16 -0700 (PDT) (envelope-from metrol@metrol.net) Received: (qmail 17769 invoked from network); 9 Oct 2002 17:43:15 -0000 Received: from unknown (HELO metlap.priv.metrol.net) ([66.92.40.27]) (envelope-sender ) by mail15.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 9 Oct 2002 17:43:15 -0000 Content-Type: text/plain; charset="us-ascii" From: Michael Collette To: FreeBSD Mailing Lists Subject: FTP gone weird Date: Wed, 9 Oct 2002 10:43:07 -0700 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200210091043.07131.metrol@metrol.net> 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 Having a heck of a time with what I thought would be a pretty simple cron job of pulling down a web log via FTP. In the process, I've run into a wall of port problems. The Scenario: I'm running an ssh session looped back to itself so as to configure a tunneled port forward from localhost:2121 to remoteserver:21 My cron job calls a small shell script that puts together the proper file name to get for the day, then issues the following command... ftp ftp://${USER}:${PW}@${SITE}:${PT}${REMDIR}${FILE} The site and port vars are set to "localhost:2121" to go through the tunnel. When I run this script from a command line, it works exactly as I would expect it to. From cron, I get the following error... Data connection to 127.0.0.1:49159 is not allowed when control connection is from 10.10.10.10:3553! The from IP is faked for this example. The actual error has the routeable IP address of this box. The port numbers both increment on each attempt. The end goal here is to just automate an FTP download through an SSH tunnel. The remote machine is not running sftp, nor do I have admin rights to it. SSH forwarding is pretty much my only option there. Any ideas? Later on, -- "Outside of a dog, a book is man's best friend. Inside of a dog, it's too dark to read." - Groucho Marx To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message