|
This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] from the ibm knowlege base ... Document Title Behavior of FTP Passive Mode Document Description Many times when using FTP, the user gets signed on the FTP server without a problem, but when he tries to do a GET, PUT, LS, or DIR, the client session reports the following error: Unable to Establish Data Connection or Error 451, Transfer Aborted. Other times, the FTP client session appears to hang for a long period of time and eventually times out. The root of this problem is that there may be a firewall between the systems. When going to the iSeries 400 server or from the iSeries 400 client, a control connection is made over port 21. After the user is logged on the FTP server, local and current directories can be changed. After this, the user initiates a GET or a PUT to move the file to a specific location. When data is passed between two systems via a GET, PUT, LS, or DIR, using Passive Mode, the client and server choose ephemeral ports (random port numbers, usually above 1024). This may conflict with firewalls that restrict certain port activity. To fix this problem, before doing the GET, PUT, LS, or DIR, change to Port Mode using the SENDPASV subcommand. Port Mode causes the server to open the Data Connection, using port 20. The SENDPASV command works as a toggle switch, alternating between Passive Mode and Port Mode. Starting at V4R4M0, SENDPASV 0 sets the mode to Port and SENDPASV 1 sets the mode to Passive. When setting the mode to Port, FTP will send data over port 20 rather than choosing a random port. This helps firewall administrators who must open only ports 20 and 21. (If Network Address Translation is used, Passive Mode may be necessary, as only the client can open connections in certain cases.) The mode (Passive or Port) is determined by the FTP client. The iSeries 400 client defaults to Passive mode, starting at V4R2M0. The default can be changed to Port mode using the following command to create a data area: CRTDTAARA DTAARA(QUSRSYS/QTMFTPPASV) + TYPE(*LGL) AUT(*USE) Deleting this data area returns the default to Passive mode. part of the answer? jim franz ----- Original Message ----- From: "Bartell, Aaron L. (TC)" <ALBartell@taylorcorp.com> To: <rpg400-l@midrange.com> Sent: Tuesday, June 25, 2002 1:59 PM Subject: FTP - Entering passive mode > What does it mean when I am FTP'ing from my AS/400 to another FTP server and > I get the following line in my FTP output? > > 227 Entering Passive Mode (188,25,6,33,13,111). > > Also, if someone could point out a site that contains all of the return > codes like 227 and what they mean that would be great. So far I have only > been able to find sites that give documentation like the following: > > Entering Passive Mode (h1,h2,h3,h4,p1,p2). > > Which doesn't tell me much. > > Aaron Bartell > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > > --
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.