xreef / SimpleFTPServer

A simple FTP server for Arduino, ArduinoSAMD WiFiNINA, esp8266, esp32, stm32 and Raspberry Pi Pico W
Other
139 stars 39 forks source link

Passive Mode does not work from outside of LAN but works within same LAN #59

Closed qiweimao closed 3 months ago

qiweimao commented 4 months ago

I understand this is a closed issue: https://github.com/xreef/SimpleFTPServer/issues/8 Please let me know if i should comment via the above link directly.

I've encountered a problem where both FileZilla and command line FTP clients

The client does not receive any response from the server when attempting to connect from outside the LAN in passive mode. Below is a sample response:

Status:         Connection established, waiting for welcome message...
Response:   220 --- Welcome to Simply FTP server ---
Status:         Plain FTP is insecure. Please switch to FTP over TLS.
Response:   220 ---   By Renzo Mischianti   ---
Response:   220 --    Version 2.1.7 (2023-10-17)    --
Command:    USER esp32
Response:   331 Ok. Password required
Command:    PASS *****
Response:   230 Ok
Command:    OPTS UTF8 ON
Response:   200 OK, UTF8 ON
Status:         Logged in
Status:         Retrieving directory listing of "/"...
Command:    CWD /
Response:   250 Directory changed to /
Command:    TYPE I
Response:   200 TYPE is now 8-bit binary
Command:    PASV

Please advise, thanks! Qiwei Mao.

I found another implementation with PASV implemented, will experiment with it and report back.

xreef commented 4 months ago

Hi, It can't work without manual intervention on your network and config; you must set the correct IP and manage the routing of the request. Bye Renzo