Report this

What is the reason for this report?

UFW rejecting FTP connections to ProFTPd

Posted on July 12, 2014

Hi,

To strenghten security I want to enable UFW (on Ubuntu 14.04 x64 droplet). I have changed my FTP port from 21 to xx (something else). I allowed this port in ufw by commands: “sudo ufw allow xx/tcp” OR “sudo ufw allow xx”

But unfortunately nothing works for FTP connections. Is it so that I have to enable port 21 as well as xx OR should I try enabling PassiveMode in ProFTPd conf file?

Can anyone throw some light on this issue?

– Regards Saurabh



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi,

For file transfers from my PC, I’m using WinSCP Client. However, I have several sites where users upload their files and I have configured FTP in my site coding so that such uploads can take place over FTP and not through browser. Is this also insecure? If yes, can I configure ProFTPd for SFTP connections? Will those uploads be done through SFTP if configured in coding?

Got the same problem and I use ProFTPD and WinSCP too. Just allow port range 50000-65535 in ufw, because ftp server choose random passive ports from this range. Or change passive mode to active.

I recommend using SFTP instead of FTP as it is more secure. It uses your existing SSH credentials and encrypts the connection unlike FTP.

If you still wish to use FTP, you will need to whitelist port 20 as well and configure your FTP client to use Active mode:

sudo ufw allow 20/tcp

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.