From owner-freebsd-questions Sun Dec 30 14:56:29 2001 Delivered-To: freebsd-questions@freebsd.org Received: from cluttered.com (w024.z064002058.sjc-ca.dsl.cnc.net [64.2.58.24]) by hub.freebsd.org (Postfix) with ESMTP id 53D3B37B417 for ; Sun, 30 Dec 2001 14:56:23 -0800 (PST) Received: from orgasmotron.cluttered.com (jsd [10.10.10.3]) by cluttered.com (Postfix) with ESMTP id 00128C9800 for ; Sun, 30 Dec 2001 14:56:26 -0800 (PST) Message-Id: <4.3.2.7.2.20011230144925.00c54890@10.10.10.1> X-Sender: jsd@10.10.10.1 X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Sun, 30 Dec 2001 14:56:22 -0800 To: freebsd-questions@freebsd.org From: Jon Drukman Subject: ftp over ssh - problems Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 there are still many reasons i need to use ftp, unfortunately. i use ftp-over-ssh to make it as secure as possible, but i have run into problems with recent freebsd installs. it seems that passive mode sends 127.0.0.1 instead of the host's public ip address. this means that the ftp client tries to connect to a port on localhost that won't be listening in order to list the files. connection refused. the session looks something like this: 220 jsd.com FTP server (Version wu-2.6.2(2) Fri Dec 28 12:21:04 PST 2001) ready. USER jsd 331 Password required for jsd. PASS (hidden) 230 User jsd logged in. PWD 257 "/home/jsd" is current directory. Host type (I): UNIX (standard) PASV 227 Entering Passive Mode (127,0,0,1,32,74) connecting to 127.0.0.1:8266 - - connecting to 127.0.0.1 ... can't connect to 127.0.0.1 - connection refused connect: connection refused PORT 127,0,0,1,5,7 200 PORT command successful. LIST 425 Can't build data connection: Connection refused. i tried with the default ftpd that comes with FBSD 4 and wu-ftpd, same behavior. here's what a successful transaction looks like (the host in question is running solaris 2.7). note how the PASV command returns the remote machine's IP and not 127.0.0.1. any ideas on why freebsd would behave differently, and more importantly, how to fix it? Connected to 127.0.0.1 port 21 220 sss FTP server (SunOS 5.6) ready. USER jsd 331 Password required for jsd. PASS (hidden) 230 User jsd logged in. PWD 257 "/export/home/jsd" is current directory. Host type (I): UNIX (standard) PASV 227 Entering Passive Mode (206,132,131,3,167,119) connecting to 206.132.131.3:42871 - - connecting to 206.132.131.3 ... Connected to 206.132.131.3 port 42871 LIST 150 ASCII data connection for /bin/ls (64.2.58.24,1290) (0 bytes). Received 2352 bytes in 0.2 secs, (91.29 Kbps), transfer succeeded 226 ASCII Transfer complete. -jsd- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message