Linux – FTP server timeouts on passive, I can only use active

ftplinux

I am running Proftpd on Ubuntu Server 10.04. Filezilla was configured to switch to active mode on failure but connection fails at MLSD time out; Filezilla needs to prefer active mode to connect. Coreftp switched to active from passive and used LIST instead. I don't think I specifically need passive mode but I have a shallow understanding from Google results that passive is encouraged. Although I am behind a NAT for troubleshooting I am using my own network's allocated IPs. Otherwise I have a business line so external IP is static and the cable company's router forwards ports to the server. Is my server misconfigured for passive mode and if so: Is it important to get passive mode working? and how it could be done.

Client logs & proftpd.conf

Best Answer

As far as I see, you are connecting to your internal ip (192.168.1.53) but the server gives its external IP (71.127.90.47) according to MasqueradeAddress directive. You are also using TLS, that's why the router may not be able to track the FTP connection.

I had the same problem with my pureftpd server and worked it around with launching two different addresses to announce (like MasqueradeAddress in your case) one for internal zone and one for external (external address is being staticaly NATed be ciso router). These server processes listen to different ports (10021 and 20021). I also added these strings to my iptables config:

-A PREROUTING -i eth0 -p tcp -m tcp --dport 21 -j REDIRECT --to-ports 10021
-A PREROUTING -i eth1 -p tcp -m tcp --dport 21 -j REDIRECT --to-ports 20021

As you see, all requests from internal networ are redirected to "local" server and all others are redirected to "internet" server.

I hope, I understood the problem right and my explanation is clear enough.

P.S. About FTPtest.net. I also tested my server with this tester, but it hav very strict rules. My tests passed with http://www.net2ftp.com/