FTP Login doesn't work

Hey,

I am having a problem on Virtualmin Pro version when i try to connect FTP account. Connection established perfectly and then it goes to directory list mode and after few second time out error and disconnect from server.

I am using Debian 9 Stretch with LEMP stack.
see the error below


Status: Resolving address of orthosurgical.co
Status: Connecting to 158.69.206.118:21…
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 the current directory
Command: TYPE I
Response: 200 Type set to I
Command: PASV
Response: 227 Entering Passive Mode (158,69,206,118,144,219).
Command: MLSD
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing

Looks like a firewall issue. It’s trying to establish a passive connection but failing. Something might be blocking ephemeral high ports on your network…try making sure ports 50000-55000 are open on your client network (ephemeral ports should already be open on the Virtualmin server, unlesss you closed them or are running some other firewall than the one we setup).

You could also try SFTP (FTP over SSH protocol) which runs on port 2222 on a Virtualmin system. You can also use SFTP on port 22, if you’ve granted the user shell access (but they won’t be jailed in their home by default, as they would be for an FTP connection, though jails are available).

I have the same issue, I ‘‘fixed’’ it by using SFTP too : )