[comp.protocols.tcp-ip.ibmpc] PASV mode on ftp server

gaspar@STL-08SIMA.ARMY.MIL (Al Gaspar) (11/30/90)

    I am attempting to use BFTP (running on a SPARC+ under 4.1 SunOs)
to move a file from a Unisys 5000/95 running SysV.3 and to a PC (I have
tried both ka9q's server and the one in tnvt from ftp software).  BFTP
needs to have one of the two remote machines ftp server support PASV
mode.  The Unisys box does not, the PC does.  Everything starts out
according to plan.  BFTP connects to both machines; it determines that
it can't put the Unisys machine in PASV mode and puts the PC in passive
mode instead.  The PC comes back and says to use port 20.  BFTP passes
the port information along to the Unisys machine.  It tries to make the
connect, and the PC refuses the connection.  The transcript of this
conversation is attached in the forwarded message.  Why does the PC
give a port number that it won't answer?  Does anyone have any ideas
as to what is going on?  Is there a way around this?  Thanks in advance.

Cheers--

Al

-- 
Al Gaspar	<gaspar@stl-08sima.army.mil>
USAMC SIMA, ATTN:  AMXSI-TTC, 1222 Spruce St., St. Louis, MO  63103-2834
COMMERCIAL:  (314) 331-4354	AUTOVON:  555-4354
uunet.uu.net!stl-08sima.army.mil!gaspar

------- Forwarded Message

    Request type: COPY
    Source: stl-08sima,gaspar,XXX,,21,,.login
    Destination: stl-94sima,gaspar,XXX,,21,,log.tst
    Stru: F, Mode: S, Type: A N, Creation: STOR
    Multiple matching: FALSE, Return mailbox: 'gaspar@stl-08sima'
    Remaining tries: 5, Current retry interval: 15 minutes


Request bftp659909893 submitted to run at Nov 29 14:18:13 1990 CST.

  Nov 29 14:19:00 1990 CST: starting...

    Request type: COPY
    Source: stl-08sima,gaspar,XXX,,21,,.login
    Destination: stl-94sima,gaspar,XXX,,21,,log.tst
    Stru: F, Mode: S, Type: A N, Creation: STOR
    Multiple matching: FALSE, Return mailbox: 'gaspar@stl-08sima'
    Remaining tries: 4, Current retry interval: 15 minutes

Connect to: stl-08sima, 21
  stl-08sima ==> 220 stl-08sima FTP server (EXOS Version 4.2 Thu Jan 29 16:21:41 PST 1987) ready.
Connect to: stl-94sima, 21
  stl-94sima ==> 220-(null) PC/TCP 2.0 FTP Server by FTP Software ready
  stl-94sima ==> 220 Connection is automatically closed if idle for 5 minutes
Logging in: gaspar, on stl-08sima
  stl-08sima <== USER gaspar
  stl-08sima ==> 331 Password required for gaspar.
  stl-08sima <== PASS XXX
  stl-08sima ==> 230 User gaspar logged in.
Logging in: gaspar, on stl-94sima
  stl-94sima <== USER gaspar
  stl-94sima ==> 230 User OK, no password
Creating 'bftp659909893.list' list-file
  stl-08sima <== PASV
  stl-08sima ==> 502 PASV command not implemented.
  stl-94sima <== PASV
  stl-94sima ==> 227 Entering passive mode: (192,35,148,94,0,20)
  stl-08sima <== PORT 192,35,148,94,0,20
  stl-08sima ==> 200 PORT command okay.
Transferring .login
  stl-94sima <== STOR log.tst
  stl-08sima <== RETR .login
  stl-08sima ==> 150 Opening data connection for .login (192.35.148.94,20).
  stl-08sima ==> 425 Can't build data connection:  Connection refused.

Status: FAILED BUT CAN RETRY

  stl-08sima <== QUIT
  stl-94sima <== QUIT

  Nov 29 14:19:15 1990 CST: completed unsuccessfully.

Request bftp659909893 submitted to run at Nov 29 14:34:15 1990 CST.

  Nov 29 14:20:57 1990 CST: request cancelled.

------- End of Forwarded Message

jbvb@FTP.COM ("James B. Van Bokkelen") (12/03/90)

    ....  BFTP connects to both machines; it determines that it can't put
    the Unisys machine in PASV mode and puts the PC in passive mode instead.

We have tested PASV against a number of hosts, but never BFTP that I know of.
We'll see how hard it is to set up, and maybe give it a try.

    ...  The PC comes back and says to use port 20.  BFTP passes
    the port information along to the Unisys machine.  It tries to make the
    connect, and the PC refuses the connection....

Are you using the Telnet part of TNVT while you try BFTP?  If so, how many
sessions are open?  Our FTP server needs 3 available TCPs for your scenario
(control, data and one listening for new control connections).  Since our
kernel defaults to 4 TCPs, if you try this with two Telnet sessions open,
you'll get this error.  Either close a session or start the PC/TCP kernel
with more TCPs.  If this doesn't fix it, try the separate FTPSRV.EXE, which
uses the same code base, but has extensive console debugging messages,
and let our support people know what it says...

James B. VanBokkelen		26 Princess St., Wakefield, MA  01880
FTP Software Inc.		voice: (617) 246-0900  fax: (617) 246-0901

gaspar@STL-08SIMA.ARMY.MIL (Al Gaspar) (12/17/90)

	First, thanks for the help from James Van Bokkelen.  I tried the
suggestions that you made and the transfer still fails.  However,
I did learn a couple of things...

	I am using three machines in my experiment a SPARC+ running the
BFTP (see RFC 1068) program under 4.1 SunOs, a UNISYS (Sperry) 5000/95
running SysV.3, and the PC running the 2.4 version of FTP Software's
ftpsrv.exe.  If I use BFTP to transfer from the PC to the UNISYS box
it works correctly; however, if I attempt to go from the UNISYS box
to the PC it fails.  In either case the PC ftp server accepts the
PASV command for server to server transfer; however when it fails it
gives a connection error.  I ran the server in debug mode (results
attached) and talked to FTP Software's technical support people.  The
technical support staff were very professional but could not shed any
light on why the server to server transfer might work in one direction
and not the other.  I suspect that the server does not like the
connect coming from a machine other than the one that issued the PASV
command.

	If anyone has any thoughts on this I would appreciate hearing them.
I am especially interested in confirmation, one way or the other, on my
suspicion that the server is refusing the connect because it is 
coming from a different machine than the one that put it in PASV mode.
Also, if anyone knows of another ftp server for the PC that might
support server to server transfer, I'd love to hear about it.
Thanks for any help.

Cheers--

Al

-- 
Al Gaspar	<gaspar@stl-08sima.army.mil>
USAMC SIMA, ATTN:  AMXSI-TTC, 1222 Spruce St., St. Louis, MO  63103-2834
COMMERCIAL:  (314) 331-4354	AUTOVON:  555-4354
uunet.uu.net!stl-08sima.army.mil!gaspar

-----Included file <<Failed FTP debug log>>

debugging logging on
#1: Connection from 192.70.191.2, port 1104
#1:>>> USER gregory
#1: User gregory logged in
#1:>>> PASV
passive open on local port 20
#1:>>> STOR ftpfile.tst
ftp_open_data(192.70.191.2, 1104)
passive open on 192.70.191.2:1104
ftp_open_data() returns 0007
#1: Data connection error
#1:>>> QUIT
#1: Closing connection to 192.70.191.2
Cleaning connection 1

-----End included file

-----Included file <<Succeeded FTP debug log>>

#1: Connection from 192.70.191.2, port 1107
#1:>>>USER gregory
#1: User gregory logged in
#1:>>>PASV
passive open on local port 20
#1:>>> RETR ftpusers
ftp_open_data(192.70.191.2, 1107)
passive open on 192.70.191.2:1107
ftp_open_data() returns 0007
#1:>>> QUIT
#1: Closing connection to 192.70.191.2
Cleaning connection 1

-----End included file

-----Included file <<BFTP log from successful FTP>>

    Request type: COPY
    Source: stl-92sima,gregory,XXX,,21,,ftpusers
    Destination: stl-08sima,gaspar,XXX,,21,,ftpusers
    Stru: F, Mode: S, Type: A N, Creation: STOR
    Multiple matching: FALSE, Return mailbox: 'gaspar@stl-08sima'
    Remaining tries: 5, Current retry interval: 15 minutes


Request bftp660582288 submitted to run at Dec  7 09:04:48 1990 CST.

  Dec  7 09:05:00 1990 CST: starting...

    Request type: COPY
    Source: stl-92sima,gregory,XXX,,21,,ftpusers
    Destination: stl-08sima,gaspar,XXX,,21,,ftpusers
    Stru: F, Mode: S, Type: A N, Creation: STOR
    Multiple matching: FALSE, Return mailbox: 'gaspar@stl-08sima'
    Remaining tries: 4, Current retry interval: 15 minutes

Connect to: stl-92sima, 21
  stl-92sima ==> 220-stl-92sima.army.mil PC/TCP 2.0 FTP Server by FTP Software 
ready
  stl-92sima ==> 220 Connection is automatically closed if idle for 5 minutes
Connect to: stl-08sima, 21
  stl-08sima ==> 220 stl-08sima FTP server (EXOS Version 4.2 Thu Jan 29 16:21:4
1 PST 1987) ready.
Logging in: gregory, on stl-92sima
  stl-92sima <== USER gregory
  stl-92sima ==> 230 User OK, no password
Logging in: gaspar, on stl-08sima
  stl-08sima <== USER gaspar
  stl-08sima ==> 331 Password required for gaspar.
  stl-08sima <== PASS XXX
  stl-08sima ==> 230 User gaspar logged in.
Creating 'bftp660582288.list' list-file
  stl-92sima <== PASV
  stl-92sima ==> 227 Entering passive mode: (192,35,148,92,0,20)
  stl-08sima <== PORT 192,35,148,92,0,20
  stl-08sima ==> 200 PORT command okay.
Transferring ftpusers
  stl-08sima <== STOR ftpusers
  stl-92sima <== RETR ftpusers
  stl-92sima ==> 150 Opening data connection
  stl-92sima ==> 226 Transfer successful. Closing data connection
  stl-08sima ==> 150 Opening data connection for ftpusers (192.35.148.92,20).
  stl-08sima ==> 226 Transfer complete.
  stl-92sima <== QUIT
  stl-08sima <== QUIT

  Dec  7 09:05:14 1990 CST: completed successfully.

-----End included file

-----Included file <<BFTP log from failed FTP>>

    Request type: COPY
    Source: stl-08sima,gaspar,XXX,,21,,.login
    Destination: stl-94sima,gaspar,XXX,,21,,log.tst
    Stru: F, Mode: S, Type: A N, Creation: STOR
    Multiple matching: FALSE, Return mailbox: 'gaspar@stl-08sima'
    Remaining tries: 5, Current retry interval: 15 minutes


Request bftp659909893 submitted to run at Nov 29 14:18:13 1990 CST.

  Nov 29 14:19:00 1990 CST: starting...

    Request type: COPY
    Source: stl-08sima,gaspar,XXX,,21,,.login
    Destination: stl-94sima,gaspar,XXX,,21,,log.tst
    Stru: F, Mode: S, Type: A N, Creation: STOR
    Multiple matching: FALSE, Return mailbox: 'gaspar@stl-08sima'
    Remaining tries: 4, Current retry interval: 15 minutes

Connect to: stl-08sima, 21
  stl-08sima ==> 220 stl-08sima FTP server (EXOS Version 4.2 Thu Jan 29 16:21:4
1 PST 1987) ready.
Connect to: stl-94sima, 21
  stl-94sima ==> 220-(null) PC/TCP 2.0 FTP Server by FTP Software ready
  stl-94sima ==> 220 Connection is automatically closed if idle for 5 minutes
Logging in: gaspar, on stl-08sima
  stl-08sima <== USER gaspar
  stl-08sima ==> 331 Password required for gaspar.
  stl-08sima <== PASS XXX
  stl-08sima ==> 230 User gaspar logged in.
Logging in: gaspar, on stl-94sima
  stl-94sima <== USER gaspar
  stl-94sima ==> 230 User OK, no password
Creating 'bftp659909893.list' list-file
  stl-08sima <== PASV
  stl-08sima ==> 502 PASV command not implemented.
  stl-94sima <== PASV
  stl-94sima ==> 227 Entering passive mode: (192,35,148,94,0,20)
  stl-08sima <== PORT 192,35,148,94,0,20
  stl-08sima ==> 200 PORT command okay.
Transferring .login
  stl-94sima <== STOR log.tst
  stl-08sima <== RETR .login
  stl-08sima ==> 150 Opening data connection for .login (192.35.148.94,20).
  stl-08sima ==> 425 Can't build data connection:  Connection refused.

Status: FAILED BUT CAN RETRY

  stl-08sima <== QUIT
  stl-94sima <== QUIT

  Nov 29 14:19:15 1990 CST: completed unsuccessfully.

Request bftp659909893 submitted to run at Nov 29 14:34:15 1990 CST.

  Nov 29 14:20:57 1990 CST: request cancelled.

-----End included file