cURL / Mailing Lists / curl-users / Single Mail

curl-users

ftp over proxy using the PORT command

From: DUIMSTRA, THOMAS J (TOM), ATTSI <tduimstra_at_att.com>
Date: Wed, 9 Jul 2008 23:18:36 -0400

Trying to upload to some ftp server over a proxy.

/usr/local/bin/curl -v -P - -p -T tom.txt -x {proxy:port} --trace
tom.out "ftp://{userid}:{password}@{ftp-server}/path/to/upload/dir/"

The ftp-server that I'm attempting to upload to does not support PASV,
which is why I'm attempting the PORT cmd (-P).
Just not sure why I'm getting the "Illegal PORT command". Does it have
something to do with my proxy server?

Here is the content of tom.out - I've modified it for readability...

== Info: About to connect() to {proxy:port}
== Info: Connected {proxy} (proxy IP Address) {proxy port}
== Info: Establish HTTP proxy tunnel to {ftp-server}:21

                                                      
CONNECT {ftp-server}:21 HTTP/1.0..User-Agent: curl/7.9.8 (
hppa2.0n-hp-hpux 11.00) libcurl 7.9.8 (OpenSSL 0.9.6d)....
               
HTTP/1.0 200 Connection established..
Proxy-agent: iPlanet-Web-Proxy-Server/3.6..
..
== Info: Proxy replied to CONNECT request
220 Welcome to {ftp-service}
.
USER {userid}..
331 Please specify the password.
..
PASS {password}..
230 Login successful...
== Info: We have successfully logged in
PWD..
257 "/"..
== Info: Entry path is '/'
CWD path/to/upload/dir..
250 Directory successfully changed...
== Info: We connect from {client-name}
PORT aaa,bbb,cc,dd,208,217.. {aaa,bbb,cc,dd is the IP address of my
client from which I ran the curl command}
500 Illegal PORT command...
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-07-10