curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: How to up one file to drftpd (how to use --ftp-pret )

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 26 Dec 2016 19:45:47 +0100 (CET)

On Mon, 26 Dec 2016, mars zhang wrote:

> I can use FileZilla Client to up one file to drftpd successfully but I use
> curl command

> curl -T mycc2.txt --ftp-ssl --insecure --ftp-pret
> ftp://myabc:myabc123ABC@192.168.14.1:2121/123/mycc2.txt

> 0000: PASV <= Recv SSL data, 5 bytes (0x5) 0000: ....v <= Recv header, 41
> bytes (0x29) 0000: 227- Using slave2 for upcoming transfer <= Recv header,
> 53 bytes (0x35) 0000: 227 Entering Passive Mode (192,168,14,128,234,248). ==
> Info: Trying 192.168.14.128... == Info: TCP_NODELAY set == Info: Connecting
> to 192.168.14.128 (192.168.14.128) port 60152 == Info: connect to
> 192.168.14.128 port 2121 failed: Timed out == Info: Failed to connect to
> 192.168.14.1 port 2121

(I'm sure that log once looked better than when it arrived here.)

> why?

Because something (firewall or a NAT perhaps?) between curl and the server
blocked curl's TCP connection back to setup the data connection so it failed.

When using FTPS this is commonly because the FTP commands were encrypted so
any stateful inspection firewall couldn't open up the port numbers that the
PASV command's response informed about.

So it appears to be irrelevant to --ftp-pret.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ:        https://curl.haxx.se/docs/faq.html
Etiquette:  https://curl.haxx.se/mail/etiquette.html
Received on 2016-12-26