SFTP works. standar FTP randomly doesnt list files

Operating System & Version
CLOUDLINUX 6.10
cPanel & WHM Version
v86.0.18

fmosse

Well-Known Member
Jan 6, 2002
62
1
308
Hi,

FTP was working fine and suddenly when I connect to any website hosted in my dedicated server it shows


Status: Resolving the management of xxxxx.com
Status: Connecting to xx.xx.xx.xx:21 ...
Status: Connection established, waiting for the welcome message ...
Status: Initializing TLS ...
Status: Verifying certificate ...
Status: TLS connection established.
Status: Registered in
Status: Retrieving the directory listing ...
Command: PWD
Answer: 257 "/" is your current location
Command: TYPE I
Answer: 200 TYPE is now 8-bit binary
Command: PASV
Answer: 227 Entering Passive Mode (xx,xx, xx,xx,161,254)
Command: MLSD
Error: Connection timed out after 20 seconds of inactivity
Error: Error retrieving directory listing

and it doesn´t list any files. I am trying with Filezilla and WS FTP. Only a few times, after trying many times it randomly list the files fine


And if instead of using "Host Type" FTP, I use "SFTP" it works fine ALWAYS

Which could be the reason? I have ConfigServer csf. Perhaps something related to it?

(In the information above I replaced the domain and IP with "xxx")

Thanks,
Francisco
 

fmosse

Well-Known Member
Jan 6, 2002
62
1
308
You need to wshitelist ports 49152:65534 tcp_in in csf to allow for passive mode to work right.
Hi, I have this:

TCP_IN =
20,21,22,25,53,80,110,143,443,465,587,993,995,2077,2078,2079,2080,2082,2083,2086,2087,2095,2096,8443,26,

TCP_OUT =
20,21,22,25,37,43,53,80,110,113,443,587,873,993,995,2086,2087,2089,2703

So I have to leave it like this?

TCP_IN =
20,21,22,25,53,80,110,143,443,465,587,993,995,2077,2078,2079,2080,2082,2083,2086,2087,2095,2096,8443,26,49152:65534
TCP_OUT =
20,21,22,25,37,43,53,80,110,113,443,587,873,993,995,2086,2087,2089,2703,49152:65534
?

Thanks,
Francisco