How to run a passive FTP server on an Azure Linux Virtual Machine?
Configuring the endpoints on Azure firewall and the PASV ports isn't enough because the client hangs on "Entering passive mode"
Currently, running Passive FTP as smoothly as you would do in a dedicated server isn't possible because of two reasons: one is that Azure currently allows you to open only 25 endpoints (please correct me if I'm wrong) for each server, and the other is the LAN<->Virtual IP connection that Azure uses. Let's take the problems one by one.
Azure currently implements a NAT/firewall/load balancer that forwards traffic from an external Virtual IP to an internal network address (
If you opened ports 25003-25006 (one by one) you can use the following configuration to enable them
Use the following to tell vsftpd to use a different external address
Tested, worked and shared with the community!
Notes: Active FTP works as soon as the client is not behind a firewall or a Great Wall, and SFTP is the best alternate to FTP, but unfortunately many legacy applications don't support it.