Discussion:
ftp client
(too old to reply)
Chavdar Ivanov
2008-01-24 10:44:12 UTC
Permalink
Hi,

Apparently I am in need of some elucidation about the operation of the
standard NetBSD ftp client. I understand the protocol is not well
suited for the ubiquitous firewall/NAT setups, but nevertheless...

The server is running FileZilla server on a Windows 2000 server box
behind a BT firewall, which has been opened. NAT is present. The
clients are also behind firewalls. Here is the log (with blanked
addresses):

% ncftp3 -u ftpguest xyzzyx.xyz
NcFTP 3.2.1 (Jul 29, 2007) by Mike Gleason (http://www.NcFTP.com/contact/).
Connecting to 123.123.213.213...
FileZilla Server version 0.9.24 beta
written by Tim Kosse (***@gmx.de)
Please visit http://sourceforge.net/projects/filezilla/
Logging in...
Password requested by 123.123.213.213 for user "ftpguest".

Password required for ftpguest

Password: *******

Logged on
Logged in to xyzzyx.xyz.
ncftp / > ls
FireGL/ IE7-WMP11/ Misc/ NVidia/ Virtual/ b/
ncftp / >

-----------------

% /usr/bin/ftp xyzzyx.xyz
Connected to xyzzyx.xyz.
220-FileZilla Server version 0.9.24 beta
220-written by Tim Kosse (***@gmx.de)
220 Please visit http://sourceforge.net/projects/filezilla/
Name (xyzzyx.xyz:ci): ftpguest
331 Password required for ftpguest
Password:
230 Logged on
Remote system type is UNIX.
ftp> ls
229 Entering Extended Passive Mode (|||4225|)
ftp: Can't connect to `123.123.213.213': Connection refused
200 Port command successful
150 Opening data channel for directory list.
ftp: Poll timeout waiting before accept
425 Can't open data connection.
226 ABOR command successful
ftp>

----------------
% /usr/bin/ftp -A xyzzyx.xyz
Connected to xyzzyx.xyz.
220-FileZilla Server version 0.9.24 beta
220-written by Tim Kosse (***@gmx.de)
220 Please visit http://sourceforge.net/projects/filezilla/
Name (xyzzyx.xyz:ci): ftpguest
331 Password required for ftpguest
Password:
230 Logged on
Remote system type is UNIX.
ftp> ls
200 Port command successful
150 Opening data channel for directory list.
ftp: Poll timeout waiting before accept
425 Can't open data connection.
226 ABOR command successful
ftp>


Ncftp3 works fine. FileZilla Client works fine. NetBSD /usr/bin/ftp
doesn't - in both passive (the default in the first instance) and
forced active mode. There is a wait of about half a minute before the
message 'ftp: Poll timeout...' appears.

The same is true for both FreeBSD 6.0 and OpenBSD 4.2 ftp clients. I
also tested ncftp 3.1.9 on FreeBSD, which again worked - after some
timeout trying PASV it switched to PORT and was fine afterwards.

Any ideas?
--
----------------------------------------------------------------
/dev/random says:
I don't suffer from insanity. I enjoy every minute of it.
----------------------------------------------------------------
Chavdar Ivanov | Talbot Way, Small Heath Business Park
Delcam UK | Birmingham B10 0HJ, United Kingdom
Customer Support | (+44)121-6831014
----------------------------------------------------------------
James K. Lowden
2008-01-26 19:19:20 UTC
Permalink
Post by Chavdar Ivanov
Ncftp3 works fine. FileZilla Client works fine. NetBSD /usr/bin/ftp
doesn't - in both passive (the default in the first instance) and
forced active mode. There is a wait of about half a minute before the
message 'ftp: Poll timeout...' appears.
Quite a pickle....

I don't have an answer, but some things to try.

1. The ftp(1) man page suggests using "epsv4 off" in such situations.
2. Try another host e.g. ftp.netbsd.org for another data point.
3. Enable debugging to get more verbose output.

I have my money on #1. ;-)

HTH.

--jkl
Chavdar Ivanov
2008-01-27 01:34:18 UTC
Permalink
Post by James K. Lowden
Post by Chavdar Ivanov
Ncftp3 works fine. FileZilla Client works fine. NetBSD /usr/bin/ftp
doesn't - in both passive (the default in the first instance) and
forced active mode. There is a wait of about half a minute before the
message 'ftp: Poll timeout...' appears.
Quite a pickle....
I don't have an answer, but some things to try.
1. The ftp(1) man page suggests using "epsv4 off" in such situations.
Indeed...
Post by James K. Lowden
2. Try another host e.g. ftp.netbsd.org for another data point.
It works fine to most of the hosts I try to connect to. I've come
across just a few which did not.
Post by James K. Lowden
3. Enable debugging to get more verbose output.
I have my money on #1. ;-)
You would have won... I've got now

default
macdef init
epsv4 off

in my .netrc, straight from the man page.
Post by James K. Lowden
HTH.
Thanks.
Post by James K. Lowden
--jkl
--
----------------------------------------------------------------
/dev/random says:
I don't suffer from insanity. I enjoy every minute of it.
----------------------------------------------------------------
Chavdar Ivanov | Talbot Way, Small Heath Business Park
Delcam UK | Birmingham B10 0HJ, United Kingdom
Customer Support | (+44)121-6831014
----------------------------------------------------------------
Chavdar Ivanov
2008-01-27 12:47:01 UTC
Permalink
Post by Chavdar Ivanov
Post by James K. Lowden
Post by Chavdar Ivanov
Ncftp3 works fine.
.. because there is no EPSV support in ncftp3 . . .

Reading rfc2428 may get a bit confusing at times . . .
Post by Chavdar Ivanov
Post by James K. Lowden
Post by Chavdar Ivanov
FileZilla Client works fine. NetBSD /usr/bin/ftp
doesn't - in both passive (the default in the first instance) and
forced active mode. There is a wait of about half a minute before the
message 'ftp: Poll timeout...' appears.
Quite a pickle....
I don't have an answer, but some things to try.
1. The ftp(1) man page suggests using "epsv4 off" in such situations.
It also says:

"...
If an extended command fails then this option will be temporarily
disabled for the duration of the current connection, or until epsv4 is
executed again.
.."

And it *looks* like the timeout to recognize such a failure is
somewhat long. I just found out that connection to one of my ftp
servers from outside fails from time to time if there is no 'epsv4
off' command; usually it fails first time, then after a session
restart it will succeed, but with some minute timeout.
Post by Chavdar Ivanov
Indeed...
Post by James K. Lowden
2. Try another host e.g. ftp.netbsd.org for another data point.
It works fine to most of the hosts I try to connect to. I've come
across just a few which did not.
Post by James K. Lowden
3. Enable debugging to get more verbose output.
I have my money on #1. ;-)
You would have won... I've got now
default
macdef init
epsv4 off
in my .netrc, straight from the man page.
Post by James K. Lowden
HTH.
Thanks.
Post by James K. Lowden
--jkl
..
--
----------------------------------------------------------------
/dev/random says:
I don't suffer from insanity. I enjoy every minute of it.
----------------------------------------------------------------
Chavdar Ivanov | Talbot Way, Small Heath Business Park
Delcam UK | Birmingham B10 0HJ, United Kingdom
Customer Support | (+44)121-6831014
----------------------------------------------------------------
Loading...