curl / Mailing Lists / curl-users / Single Mail

curl-users

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

From: mars zhang <6671605_at_gmail.com>
Date: Tue, 27 Dec 2016 15:39:03 +0800

I am sorry that that there is a firewall in centos 7 64.
but why FileZilla can work well? different mode? how curl works like
FileZilla?

2016-12-27 9:09 GMT+08:00 mars zhang <6671605_at_gmail.com>:

> FileZilla Client works well in the same environment and there is no
> firewall. (drftpd master is in windows 10 and drftpd slave is in centos
> 7 64.)
> Can you give me a example of a curl command that can work well for drftpd?
> Thank you very much!
>
> 2016-12-27 2:45 GMT+08:00 Daniel Stenberg <daniel_at_haxx.se>:
>
>> 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
>>
>
>

-------------------------------------------------------------------
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-27