Open an Active FTP connection to Azure VM

I am trying to connect to a remote FTP server with an active connection from an Azure VM. The error I am getting is this

Illegal PORT command.

I have no problem connecting to other FTP sites using passive connections, but this FTP server only supports Active. My question is basically the same as this question , except that my problem is NOT caused by the Windows firewall. I tested this by disabling the firewall for a few seconds and trying to reconnect with no luck.

My theory is that it has something to do with Azure "Endpoints", although I cannot verify this and I do not know how to configure them to allow this.

Any ideas?

+3


source to share


1 answer


Yes, it looks like a missing endpoint (+ an inbound rule if you want to turn on the firewall). In active mode, the server connects to the client on a specific port (transmitted by the client, the PORT command) - a more detailed explanation

To use active mode on blue, you need:

  • Limit FTP client usage to a specific port (or range) and public IP (this is in your virtual machines) eg FileZilla: enter image description hereEvery client should have this somewhere in the settings. If you're out of luck and use the .NET Framework FTPWebRequest .

  • Add an endpoint with the same port (or range) to the Endpoint Settings of your Azure VM: azure-vm-port-rageCan't add a port range with one click to add each port one by one (quite annoying)



What is it. You can run FileZilla "Network Connection Wizard" to check these settings, and you should see something like this:

Connecting to probe.filezilla-project.org
Response: 220 FZ router and firewall tester ready
USER FileZilla
Response: 331 Give any password.
PASS 3.9.0.6
Response: 230 logged on.
Checking for correct external IP address
IP 23.102.xx.xxx cd-bac-dd-bcg
Response: 200 OK
PREP 6000
Response: 200 Using port 6000, data token 1941533557
PORT 23,102,xx,xxx,23,112
Response: 200 PORT command successful
LIST
Response: 150 opening data connection
Response: 200 Successful
QUIT
Response: 200 goodbye!

      

+4


source







All Articles