in reply to Net::FTP and 'Illegal PORT command'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Net::FTP and
by Bukowski (Deacon) on Jul 17, 2002 at 11:13 UTC | |
The same chunk from the SunOS machine:
Two PASV commands?
Bukowski - aka Dan (dcs@black.hole-in-the.net) | [reply] [d/l] [select] |
by amphiplex (Monk) on Jul 17, 2002 at 11:25 UTC | |
Passive=>1when creating the ftp object should fix your problem. At least it did for me. If it works, could someone explain why exactly ? ---- amphiplex | [reply] |
by rob_au (Abbot) on Jul 17, 2002 at 11:56 UTC | |
According to the output supplied, it appears that the poster of this question is attempting to connect to the FTP from a machine with a private class address - This host address, along with the preferred socket for data communications, are sent to the server via the PORT command. I would suspect that the poster is connecting to the FTP server host through a network firewall or layer of address translation and as such, the data connection from the server to your machine is failing because the FTP server is unable to reach your private machine. The means by which to fix this is to switch to passive FTP transfer mode via the PASV command - This command changes the default behaviour of data port negotiation, shifting the onus for responsibility for data port establishment and maintenance back to the client. This allows the client to control its only data connection through the network firewall or translation layer, allowing normal FTP communications to occur. eg.
Further information on this topic can be found in RFC documents File Transfer Protocol, Requirements for Internet hosts - communication layers and Firewall-Friendly FTP.
| [reply] [d/l] [select] |
by amphiplex (Monk) on Jul 17, 2002 at 12:19 UTC | |
by Bukowski (Deacon) on Jul 17, 2002 at 12:34 UTC | |
does indeed fix the problem under Linux.
Bukowski - aka Dan (dcs@black.hole-in-the.net) | [reply] [d/l] |
by valdez (Monsignor) on Jul 17, 2002 at 13:30 UTC | |
I think the error is here, you can't use a private address for the PORT command... Ciao, Valerio | [reply] [d/l] |
by gbarr (Monk) on Jul 17, 2002 at 18:59 UTC | |
You chopped off the top of the dubug output, what version of Net::FTP do you have installed ? As someone else noticed you have a private IP, is the server on the other side of a firewall ? If yes, you must use passive mode, as the remote server will not be able to connect back to you. But that is a different problem. | [reply] |