Unable to connect to FTP server via external IP address

Need help with FileZilla Server? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
TechnoToast
500 Command not understood
Posts: 1
Joined: 2020-02-18 00:46

Unable to connect to FTP server via external IP address

#1 Post by TechnoToast » 2020-02-18 01:14

I know this is a common issue, but any forum posts replies I find don't seem to solve my issue, so I decided that I would create my own topic.

Anyways, here is what is happening:

I've set up an FTP server on my PC running Windows 10. Its running on port 21 (my ISP doesn't block it), and have set my external IP (found on whatismyipaddress.com) for passive mode transfers. I have one user configured with full permissions to read/write/delete a directory on my C drive. Everything else is set to default.

So I opened up the FileZilla client on the same PC and attempted a connection to the server using my external IP address. This is where I run into issues.

Client Log:

Status: Connecting to MY.EXTERNAL.IP.ADDRESS:21...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is current directory.
Command: TYPE I
Response: 200 Type set to I
Command: PASV
Response: 227 Entering Passive Mode (MY,EXTERNAL,IP,ADDRESS,226,206)
Command: MLSD
Error: The data connection could not be established: ECONNREFUSED - Connection refused by server
Response: 425 Can't open data connection for transfer of "/"
Error: Failed to retrieve directory listing

Server Log:

FileZilla Server 0.9.60 beta
Copyright 2001-2016 by Tim Kosse (tim.kosse@filezilla-project.org)
https://filezilla-project.org/
Connecting to server localhost:14147...
Connected, waiting for authentication
Logged on
Warning: FTP over TLS is not enabled, users cannot securely log in.
(000053)2/17/2020 20:08:23 PM - (not logged in) (MY.EXTERNAL.IP.ADDRESS)> Connected on port 21, sending welcome message...
(000053)2/17/2020 20:08:23 PM - (not logged in) (MY.EXTERNAL.IP.ADDRESS)> 220-FileZilla Server 0.9.60 beta
(000053)2/17/2020 20:08:23 PM - (not logged in) (MY.EXTERNAL.IP.ADDRESS)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(000053)2/17/2020 20:08:23 PM - (not logged in) (MY.EXTERNAL.IP.ADDRESS)> 220 Please visit https://filezilla-project.org/
(000053)2/17/2020 20:08:23 PM - (not logged in) (MY.EXTERNAL.IP.ADDRESS)> AUTH TLS
(000053)2/17/2020 20:08:23 PM - (not logged in) (MY.EXTERNAL.IP.ADDRESS)> 502 Explicit TLS authentication not allowed
(000053)2/17/2020 20:08:23 PM - (not logged in) (MY.EXTERNAL.IP.ADDRESS)> AUTH SSL
(000053)2/17/2020 20:08:23 PM - (not logged in) (MY.EXTERNAL.IP.ADDRESS)> 502 Explicit TLS authentication not allowed
(000053)2/17/2020 20:08:28 PM - (not logged in) (MY.EXTERNAL.IP.ADDRESS)> USER admin
(000053)2/17/2020 20:08:28 PM - (not logged in) (MY.EXTERNAL.IP.ADDRESS)> 331 Password required for admin
(000053)2/17/2020 20:08:28 PM - (not logged in) (MY.EXTERNAL.IP.ADDRESS)> PASS ********
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> 230 Logged on
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> SYST
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> 215 UNIX emulated by FileZilla
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> FEAT
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> 211-Features:
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> MDTM
(000053)2/17/2020 20:08:28 PM - admin MY.EXTERNAL.IP.ADDRESS)> REST STREAM
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> SIZE
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> MLST type*;size*;modify*;
(000053)2/17/2020 20:08:28 PM - admin MY.EXTERNAL.IP.ADDRESS)> MLSD
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> UTF8
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> CLNT
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> MFMT
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> EPSV
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> EPRT
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> 211 End
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> PWD
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> 257 "/" is current directory.
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> TYPE I
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> 200 Type set to I
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> PASV
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> 227 Entering Passive Mode (MY,EXTERNAL,IP,ADDRESS,226,206)
(000053)2/17/2020 20:08:28 PM - admin (MY.EXTERNAL.IP.ADDRESS)> MLSD
(000053)2/17/2020 20:08:38 PM - admin (MY.EXTERNAL.IP.ADDRESS)> 425 Can't open data connection for transfer of "/"
(000053)2/17/2020 20:10:39 PM - admin (MY.EXTERNAL.IP.ADDRESS)> 421 Connection timed out.

Please note that this only occurs when using my external IP address! When using my internal IP I have no issues.

Any help would be greatly appreciated!

User avatar
botg
Site Admin
Posts: 35507
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Unable to connect to FTP server via external IP address

#2 Post by botg » 2020-02-18 16:24

Did you forward the passive mode port range in your NAT router?

David40
504 Command not implemented
Posts: 11
Joined: 2019-06-02 17:57
First name: David
Last name: Forte

Re: Unable to connect to FTP server via external IP address

#3 Post by David40 » 2022-12-17 16:06

botg wrote:
2020-02-18 16:24
Did you forward the passive mode port range in your NAT router?
Could you please elaborate? Why would a range be necessary when the FTP port 21 is forwarded?

User avatar
oibaf
Contributor
Posts: 398
Joined: 2021-07-16 21:02
First name: Fabio
Last name: Alemagna

Re: Unable to connect to FTP server via external IP address

#4 Post by oibaf » 2022-12-17 16:40

Port 21 is used for the control connection, the data connection needs other ports to be forwarded too. You got to choose which is the range.

David40
504 Command not implemented
Posts: 11
Joined: 2019-06-02 17:57
First name: David
Last name: Forte

Re: Unable to connect to FTP server via external IP address

#5 Post by David40 » 2022-12-17 17:07

Thanks for that quick response.

Are there any typical ranges that are customary or is it left to random choice?

User avatar
oibaf
Contributor
Posts: 398
Joined: 2021-07-16 21:02
First name: Fabio
Last name: Alemagna

Re: Unable to connect to FTP server via external IP address

#6 Post by oibaf » 2022-12-17 17:15

Here you'll find all the info you need to know: https://wiki.filezilla-project.org/Netw ... figuration

It refers to the old FileZilla Server, but all the networking stuff applies regardless.

David40
504 Command not implemented
Posts: 11
Joined: 2019-06-02 17:57
First name: David
Last name: Forte

Re: Unable to connect to FTP server via external IP address

#7 Post by David40 » 2022-12-17 18:03

Thank You

Post Reply