curl-users
RE: FTPS over HTTP proxy unable to setup data connection
Date: Tue, 16 Jun 2015 10:44:10 +0000
Can someone please help on this one? Thanks.
Regards,
Amit Umbarkar
From: Amit Umbarkar
Sent: Wednesday, June 10, 2015 5:08 PM
To: 'curl-users_at_cool.haxx.se'
Subject: RE: FTPS over HTTP proxy unable to setup data connection
Thanks Dan.
As per your suggestion got rid of all -Q options. Now my command & logs looks like this -
$ curl --verbose --proxytunnel -x proxy.xyz.com:80 -T abc.txt ftps://xxxx:xxxx_at_ftpssl.rbc.com/inbound/abc.txt
* About to connect() to proxy.xyz.com port 80
* Trying 172.19.111.118... * connected
* Connected to proxy.xyz.com (172.19.111.118) port 80
* Establish HTTP proxy tunnel to ftpssl.rbc.com:990
* Proxy auth using (nil) with user ''
* Server auth using Basic with user 'xxxx'
< HTTP/1.0 200 Connection established
<
* Proxy replied OK to CONNECT request
* successfully set certificate verify locations:
* CAfile: /usr/share/ssl/certs/ca-bundle.crt
CApath: none
* SSL connection using RC4-MD5
* Server certificate:
* subject: /C=CA/ST=Ontario/L=Toronto/O=Royal Bank of Canada/OU=B2Bnetsp10/CN=ftpssl.rbc.com
* start date: 2012-07-03 00:00:00 GMT
* expire date: 2015-07-03 23:59:59 GMT
* subjectAltName: ftpssl.rbc.com matched
* issuer: /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)10/CN=VeriSign Class 3 Secure Server CA - G3
* SSL certificate verify ok.
< 220 RBCNG FTPS (Version Wed Jun 10 07:00:02 2015) server ready.
> USER xxxx
< 331 Password required for xxxx.
> PASS xxxx
< 230 User xxxx logged in.
* We have successfully logged in
> PBSZ 0
< 502 PBSZ Command not implemented.
> PWD
< 257 "/usr/nn/gateway/mbox/fxf/xxxx" is current directory.
* Entry path is '/usr/nn/gateway/mbox/fxf/xxxx'
> CWD inbound
< 250 CWD Command successful.
> EPSV
< 500 EPSV Command not understood.
> PASV
< 227 Entering Passive Mode (142,245,8,80,24,139)
* Trying 172.19.111.118... * connected
* Connecting to 142.245.8.80 (172.19.111.118) port 80
* Establish HTTP proxy tunnel to 142.245.8.80:6283
* Proxy auth using (nil) with user ''
* Server auth using Basic with user 'xxxx'
Segmentation fault
Good thing is I see its trying to establish a data connection for FTPS on a random port in 6200-6299 range(as Windows based client does), but STOR abc.txt is not passed & ultimately its giving “Segmentation fault”.
Can you please advise if any further modifications are required in my curl command to make this work? Thanks.
Regards,
Amit Umbarkar
-----Original Message-----
From: curl-users [mailto:curl-users-bounces_at_cool.haxx.se] On Behalf Of Dan Fandrich
Sent: Wednesday, June 10, 2015 4:05 AM
To: curl-users_at_cool.haxx.se
Subject: Re: FTPS over HTTP proxy unable to setup data connection
On Tue, Jun 09, 2015 at 03:35:01PM +0000, Amit Umbarkar wrote:
> I am trying to post a file on FTPS site via HTTP proxy using “implicit” method.
> Though am able to login & change directories, but hitting upon “* FTP response
> reading failed” error on each attempt of file STOR command. Here are the
> detailed logs –
>
> /home$ curl --user xxxx:xxxx --tlsv1 --disable-epsv --show-error -Q "CWD
> inbound" -Q "TYPE I" -Q PWD -Q PASV -Q "STOR abc.txt" --verbose --proxytunnel
> -x proxy.xyz.com:80 ftps://ftpssl.rbc.com
Why are you setting all those -Q options? All those commands are sent by curl
itself automatically, and their presence is confusing curl's internal state
machine. Remove them, change the URL to
ftps://ftpssl.rbc.com/inbound/abc.txt and add the option -T abc.txt (to specify
the uploaded file name) and you should see much better results.
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-06-16