FTP disconnects after MSLD command?

Hey there,

After fully setting up my server with everything working (DNS, SSH, E-Mail), I tried to log on to an account using FTP with the FileZilla FTP Client. When I attempt to connect to one of the accounts on the server, I get this in my log:
Status: Resolving address of infohoarder.com
Status: Connecting to 178.85.83.167:21…
Status: Connection established, waiting for welcome message…
Response: 220 ProFTPD 1.3.3e Server (infohoarder.com) [::ffff:192.168.1.95]
Command: USER infohoarder
Response: 331 Password required for infohoarder
Command: PASS ***************
Response: 230 User infohoarder logged in
Command: OPTS UTF8 ON
Response: 200 UTF8 set to on
Status: Connected
Status: Retrieving directory listing…
Command: PWD
Response: 257 “/home/infohoarder” is the current directory
Command: TYPE I
Response: 200 Type set to I
Command: PASV
Response: 227 Entering Passive Mode (178,85,83,167,233,71).
Command: MLSD
Error: Connection timed out
Error: Failed to retrieve directory listing

I was hoping someone would know something about this problem… From my research on Google I’ve managed to find something that would work (disabling MLSD), but that appears to be just a workaround and I would like to have my server functioning fully.

I’ve port forwarded both port 20 and 21 to TCP on my router, so I don’t think that that is the problem.

Thanks in advance!

EDIT:
Active FTP mode seems to work, so it has got to be something with my passive configuration.

I’ve found something that seems to fix it, but I’m unsure whether it is the best way to do so, by running this command:
modprobe ip_conntrack_ftp

However, this needs to be run every time I start my server and it feels very unnatural. Shouldn’t passive FTP work by default? It seems that this isn’t the correct way to fix the problem.

Any further help is appreciated!

Howdy,

Depending on your network setup, the solution you performed may be required. It’s no problem at all to do that… and the key may just be to automate that at boot time.

You could always add the modprobe line into your /etc/rc.local file, which will cause it to be run when your system boots.

-Eric

Okay, thanks!

I’ve added the command to my /etc/rc.local file, and everything is working as it should now!

Thanks again for your help!