curl falla al enviar el archivo hacia un FTPS

curl falla al enviar el archivo hacia un FTPS

Intentando enviar "test_file" al servidor FTPS.

curl -v -k --ftp-ssl --tlsv1 --ftp-ssl-reqd --ftp-pasv --key key_nopass.pem --cert client.pem --user 'user:pass' --upload-file test_file ftp://Ftps.example.com:21/

Se conecta, pero después falla. Aquí hay algunos resultados:

> * Connected to EXAMPLE.COM_IP_ADDRESS (IP_ADDRESS) port 21 (#0)
> < 220 Microsoft FTP Service
> > AUTH SSL
> < 234 AUTH command ok. Expecting TLS Negotiation.
> * successfully set certificate verify locations:
> USER username
< 331 Password required for username.
> PASS thepassword
< 230 User logged in.
> PBSZ 0
< 200 PBSZ command successful.
> PROT P
< 200 PROT command successful.
> PWD
< 257 "/" is current directory.
* Entry path is '/'
> EPSV
* Connect data stream passively
< 229 Entering Extended Passive Mode (|||5013|)
*   Trying example.com.ip.addess
  0     0    0     0    0     0      0      0 --:--:--  0:00:09 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:03:09 --:--:--     0* Connection timed out
* couldn't connect to host
* got positive EPSV response, but can't connect. Disabling EPSV
> PASV
* response reading failed
  0     0    0     0    0     0      0      0 --:--:--  0:03:09 --:--:--     0
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
} [data not shown]
curl: (56) response reading failed

Parece que después de "Conectado a EXAMPLE.COM_IP_ADDRESS (IP_ADDRESS))" e "Iniciado sesión", dice "no se pudo conectar al host", aunque, en unas líneas arriba parece estar conectado "

ACTUALIZAR: Al ejecutar el mismo comando con el argumento "--disable-epsv", parece que también está intentando abrir puertos del canal de datos:

* Connect data stream passively
< 227 Entering Passive Mode (A,B,C,D,19,179).

Donde A,B,C,D es la IP del servidor y creo que las demás: 19.179 son los puertos. ¿Bien? PD: el último número (179) se incrementa en 1 cada vez que ejecuto el comando.

información relacionada