Failed to retrieve directory listing

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
NetzenRob
504 Command not implemented
Posts: 6
Joined: 2022-06-04 16:05
First name: Rob
Last name: Phelps

Failed to retrieve directory listing

#1 Post by NetzenRob » 2022-06-04 16:15

Hi Guys,

I am on a NAT environrment and need help setting up filezilla and have the following settings but no luck connecting:

Draytek NAT Router - I have port forwarded for both ftp port and passive mode range
Windows Server - allowed ports in Windows firewall
Configured user - with virtualk path / and native path c:\ftp and enabled
Server Listeners - added the NAT ip and port and real public IP and port
Passive mode - ticked 'use custom port range' and addeed 49152 - 49401 - i've also put my real public IP in the 'use the following host' box


When trying to connect with a filezilla client from outside the network of the filezilla server I get the message:

Status: Connection established, waiting for welcome message...
Status: Initializing TLS...
Status: Verifying certificate...
Status: TLS connection established.
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
Command: MLSD
Response: 150 About to start data transfer.
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing


Any help would be greatly appreciated.

thank you
Rob

User avatar
boco
Contributor
Posts: 26938
Joined: 2006-05-01 03:28
Location: Germany

Re: Failed to retrieve directory listing

#2 Post by boco » 2022-06-05 02:55

Draytek NAT Router - I have port forwarded for both ftp port and passive mode range
-Check that it is a complete range forwarded, some users had included only the first and last port.
-Must be TCP only - FTP doesn't use UDP.
-Check it is static forwarding and not port triggering. Triggering won't work for FTP.
-Check that it is a 1:1 forwarding and not remapping ports.
Windows Server - allowed ports in Windows firewall
-May need to allow the process, too.
Server Listeners - added the NAT ip and port and real public IP and port
Try with 0.0.0.0 and :: first, restrict later. Public IP does not belong to here.
Passive mode - ticked 'use custom port range' and addeed 49152 - 49401 - i've also put my real public IP in the 'use the following host' box
You can also enter a domain name resolving to your IP. Use the IP only if it is not changing. Range might be a bit narrow.
Command: PASV
Response: 227 Entering Passive Mode
There's a problem here, the response to PASV must include the server IP and port.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

NetzenRob
504 Command not implemented
Posts: 6
Joined: 2022-06-04 16:05
First name: Rob
Last name: Phelps

Re: Failed to retrieve directory listing

#3 Post by NetzenRob » 2022-06-06 11:05

Thanks for this, the draytek only lets me port forward 49152 - 49401

is that ok?

See attached.

I don't understand this part:

"There's a problem here, the response to PASV must include the server IP and port."

Where do I set that?

Thank you,
Attachments
pasv port fwd.png
pasv port fwd.png (12.56 KiB) Viewed 5148 times

NetzenRob
504 Command not implemented
Posts: 6
Joined: 2022-06-04 16:05
First name: Rob
Last name: Phelps

Re: Failed to retrieve directory listing

#4 Post by NetzenRob » 2022-06-06 11:08

Also see attached, I have erased the host IP for privacy.
Attachments
pasv mode.png
pasv mode.png (18.38 KiB) Viewed 5147 times

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

Re: Failed to retrieve directory listing

#5 Post by botg » 2022-06-06 11:09

I don't understand the router's "Range mode" description, it makes no sense. Try forwarding 100 individual ports.

NetzenRob
504 Command not implemented
Posts: 6
Joined: 2022-06-04 16:05
First name: Rob
Last name: Phelps

Re: Failed to retrieve directory listing

#6 Post by NetzenRob » 2022-06-06 11:48

are the pasv mode settings right? with my real public IP?

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

Re: Failed to retrieve directory listing

#7 Post by botg » 2022-06-06 13:25

NetzenRob wrote:
2022-06-06 11:48
are the pasv mode settings right? with my real public IP?
Looks okay.

NetzenRob
504 Command not implemented
Posts: 6
Joined: 2022-06-04 16:05
First name: Rob
Last name: Phelps

Re: Failed to retrieve directory listing

#8 Post by NetzenRob » 2022-06-06 14:06

Is there any other way I can get this working? it's driving me insane.

If I look in the admin interface on the server I see:

<Date> Info [Type] Message
<06/06/2022 15:04:00> FTP Session 64 159.242.119.58 [Response] 220-FileZilla Server 1.4.1
<06/06/2022 15:04:00> FTP Session 64 159.242.119.58 [Response] 220 Please visit https://filezilla-project.org/
<06/06/2022 15:04:00> FTP Session 64 159.242.119.58 [Command] AUTH TLS
<06/06/2022 15:04:00> FTP Session 64 159.242.119.58 [Response] 234 Using authentication type TLS.
<06/06/2022 15:04:02> FTP Session 64 159.242.119.58 [Command] USER webdev2022
<06/06/2022 15:04:02> FTP Session 64 159.242.119.58 [Response] 331 Please, specify the password.
<06/06/2022 15:04:02> FTP Session 64 159.242.119.58 [Command] PASS ****
<06/06/2022 15:04:02> FTP Session 64 159.242.119.58 webdev2022 [Response] 230 Login successful.
<06/06/2022 15:04:02> FTP Session 64 159.242.119.58 webdev2022 [Command] SYST
<06/06/2022 15:04:02> FTP Session 64 159.242.119.58 webdev2022 [Response] 215 UNIX emulated by FileZilla.
<06/06/2022 15:04:02> FTP Session 64 159.242.119.58 webdev2022 [Command] FEAT
<06/06/2022 15:04:02> FTP Session 64 159.242.119.58 webdev2022 [Response] 211-Features:
<06/06/2022 15:04:02> FTP Session 64 159.242.119.58 webdev2022 [Response] 211 End
<06/06/2022 15:04:02> FTP Session 64 159.242.119.58 webdev2022 [Command] PBSZ 0
<06/06/2022 15:04:02> FTP Session 64 159.242.119.58 webdev2022 [Response] 200 PBSZ=0
<06/06/2022 15:04:02> FTP Session 64 159.242.119.58 webdev2022 [Command] PROT P
<06/06/2022 15:04:02> FTP Session 64 159.242.119.58 webdev2022 [Response] 200 Protection level set to P
<06/06/2022 15:04:02> FTP Session 64 159.242.119.58 webdev2022 [Command] PWD
<06/06/2022 15:04:02> FTP Session 64 159.242.119.58 webdev2022 [Response] 257 "/" is current directory.
<06/06/2022 15:04:03> FTP Session 64 159.242.119.58 webdev2022 [Command] TYPE I
<06/06/2022 15:04:03> FTP Session 64 159.242.119.58 webdev2022 [Response] 200 Type set to I
<06/06/2022 15:04:03> FTP Session 64 159.242.119.58 webdev2022 [Command] PASV
<06/06/2022 15:04:03> FTP Session 64 159.242.119.58 webdev2022 [Response] 227 Entering Passive Mode (my.ip.here,192,130)
<06/06/2022 15:04:03> FTP Session 64 159.242.119.58 webdev2022 [Command] MLSD
<06/06/2022 15:04:03> FTP Session 64 159.242.119.58 webdev2022 [Response] 150 About to start data transfer.
<06/06/2022 15:04:23> FTP Session 64 159.242.119.58 webdev2022 [Error] GnuTLS error -110 in gnutls_record_recv: The TLS connection was non-properly terminated.
<06/06/2022 15:04:23> FTP Session 64 159.242.119.58 webdev2022 [Status] Client did not properly shut down TLS connection
<06/06/2022 15:04:23> FTP Session 64 159.242.119.58 webdev2022 [Error] Control channel closed with error from source 0. Reason: ECONNABORTED - Connection aborted.

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

Re: Failed to retrieve directory listing

#9 Post by botg » 2022-06-07 07:53

As mentioned earlier, the router's description of "range mode" port forwarding looks suspicious. Try manually forwarding 100 individual ports, don't use the range mode.

AurelM
504 Command not implemented
Posts: 8
Joined: 2022-01-15 12:10

Re: Failed to retrieve directory listing

#10 Post by AurelM » 2022-06-07 12:34

NetzenRob wrote:
2022-06-06 14:06
Is there any other way I can get this working? it's driving me insane.
[...]
Hi, just like @botg and @boco said previously, you need to forward the ports on the router. A quick internet search for this got me to this information DrayTek - IX. NAT Related Features - Port Forwarding, so you need to remove the rule(s) that you made in post #3 from NAT >> Port Redirection and set it up in NAT >> Open Ports as per the instructions from DrayTek website.

NetzenRob
504 Command not implemented
Posts: 6
Joined: 2022-06-04 16:05
First name: Rob
Last name: Phelps

Re: Failed to retrieve directory listing

#11 Post by NetzenRob » 2022-06-08 10:53

Thank you! that fixed it. Open Ports was the correct area.

Post Reply