locked
FTP Connection to External FTP server from Azure VM RRS feed

  • Question

  • Hi,

    We are facing issues connecting to a particular FTP server(requires Active connection) from our Azure VM. In general we are able to connect to other FTP servers. This issue is not because of this FTP server as I can connect to this FTP server from my laptop. Please help us in resolving the below issue.

    We have a Azure VM from which we are trying to connect to  External Active FTP connection as below. It throws “Unable to open data connection error” from the command prompt. When we try this from the FileZilla it says ‘Failed to retrieve directory listing’.

    The same FTP connection works fine from my own laptop. I can see the directory listing from my laptop as seen below. I can see the directories in FileZilla. 

    I have also setup the outbound data end points in my Azure portal, but I still have the same issue.

    Monday, October 27, 2014 9:29 AM

Answers

  • Hi Suneelsunkara;

    Thank you for your post. With regards to your query firstly could you please disable the fierewall and then check.

    Secondly could you please FTP to a different server. This way we can know where the problem lies. Awaiting your response.

    Warm Regards

    Prasant

    Monday, October 27, 2014 1:32 PM
  • Hi Suneelsunkara;

     


     

    Here is a description of how Active FTP works. With the error the FTP server is not able to make a connection attempt back to client on Data port 20 . Make sure the Endpoint you have created maps port Servers is calling the Client. Hope this helps.

    Warm Regards;

    Prasant

     

     


    • Proposed as answer by Prasant Chhetri Wednesday, November 5, 2014 11:22 AM
    • Marked as answer by Prasant Chhetri Friday, November 14, 2014 3:23 PM
    • Unmarked as answer by Susie Long Wednesday, November 19, 2014 5:33 AM
    • Marked as answer by Prasant Chhetri Tuesday, April 21, 2015 8:23 AM
    Monday, November 3, 2014 3:00 PM
  • Hi Suneelsunkara;

     

    Customer is using FileZilla from an Azure Vm and connects to a FTP server now the problem here is that for active FTP the data port is advertised by the client and it’s a random port which can be configured in the FileZilla client. https://wiki.filezilla-project.org/Network_Configuration

    You can limit the port from 60000 to 60001 create 2 TCP endpoints for this VM for the same external ports and try to see if that works.


    Sunday, December 14, 2014 4:59 AM

All replies

  • Hi Suneelsunkara;

    Thank you for your post. With regards to your query firstly could you please disable the fierewall and then check.

    Secondly could you please FTP to a different server. This way we can know where the problem lies. Awaiting your response.

    Warm Regards

    Prasant

    Monday, October 27, 2014 1:32 PM
  • If you can connect but are having problems with ACTIVE transfers:

    I don't see how you'll succeed at active transfers with FTP in azure.  I can't see how the secondary connection to do the data transfer can be routed back to the VM doing the call, unless you have a static IP.

    Can you change your mode to PASSIVE and try it then?  Passive means the client contacts the server on a server-specified port to do the transfer, which is then azure friendly.


    Darin R.

    Monday, October 27, 2014 5:11 PM
  • Hi Prasant,

    Thanks for your response.

    I have disabled the Firewall inside the Azure VM but still this issue exists. I can do an Passive FTP conncetions to a different server. To be more clear i am getting this issue when we connect to a FTP server in ACTIVE mode. This we cant make it as Passive as the customer is allowing only ACTIVE FTP connections. 

    Tuesday, October 28, 2014 2:58 AM
  • Hi Darin,

    Thanks for your response

    This is a critical Production issue. So need help as soon as possible

    As i said earlier reply i am getting this issue when we connect to a FTP server in ACTIVE mode. This we cant make it as Passive as the customer is allowing only ACTIVE FTP connections. 

    In the Portal i have setup the below

    Name PRotocol Public Port Private Port

    FTP TCP 21 21

    FTP DATA   TCP          60000 60000

    I have also opened Port 21 in Firewall Outbound Rules.. Not sure if that will help.

    DNS NAME
    paneumanifest1.cloudapp.net
    HOST NAME
    PANEUMANIFEST1
    PUBLIC VIRTUAL IP (VIP) ADDRESS
    23.97.150.37
    INTERNAL IP ADDRESS
    100.91.112.43

    Tuesday, October 28, 2014 3:13 AM
  • It depends on the FTP app you're using I guess.

    Here's more info about why it won't work out of the box, and what you can do:

    https://enterprisedt.com/products/edtftpjssl/doc/manual/html/howtoftpthroughafilewall.html


    Darin R.

    Friday, October 31, 2014 8:47 PM
  • Hi Suneelsunkara;

     


     

    Here is a description of how Active FTP works. With the error the FTP server is not able to make a connection attempt back to client on Data port 20 . Make sure the Endpoint you have created maps port Servers is calling the Client. Hope this helps.

    Warm Regards;

    Prasant

     

     


    • Proposed as answer by Prasant Chhetri Wednesday, November 5, 2014 11:22 AM
    • Marked as answer by Prasant Chhetri Friday, November 14, 2014 3:23 PM
    • Unmarked as answer by Susie Long Wednesday, November 19, 2014 5:33 AM
    • Marked as answer by Prasant Chhetri Tuesday, April 21, 2015 8:23 AM
    Monday, November 3, 2014 3:00 PM
  • Hi Prasant,

    Can you please help me on how i can map the endpoints to the port servers in Azure? I couldnt quite understand it clearly.

    Thursday, November 6, 2014 1:31 AM
  • Hi Suneelsunkara;

    Please follow this link on setting and managing endpoints in Azure.

    Regards;

    Prasant

    • Proposed as answer by Prasant Chhetri Thursday, November 6, 2014 10:33 AM
    Thursday, November 6, 2014 10:33 AM
  • Hi Prasant,

    I have already created the endpoints in my Azure Portal. The only thing i am not sure is about how to enable an Active FTP connection from an Azure VM. I have created FTP port 21 and DATA PORT for 20 & 60000 but still cant resolve this issue. Is there anything i am missing?

    Friday, November 7, 2014 2:31 AM
  • Hi Suneelsunkara;

    Is this a Linux or A Windows VM. Which software are have you used to configure.

    Let me see if i can reproduce it in my lab.

    Warm Regards;

    Prasant

    Thursday, November 13, 2014 5:48 AM
  • Hi Prasant

    THis is a Windows 2008 VM. I have configured the ports in the Azure Portal.

    Wednesday, November 19, 2014 1:37 AM
  • Hi Suneelsunkara;

     

    Customer is using FileZilla from an Azure Vm and connects to a FTP server now the problem here is that for active FTP the data port is advertised by the client and it’s a random port which can be configured in the FileZilla client. https://wiki.filezilla-project.org/Network_Configuration

    You can limit the port from 60000 to 60001 create 2 TCP endpoints for this VM for the same external ports and try to see if that works.


    Sunday, December 14, 2014 4:59 AM
  • Did you ever solve this problem? We've the same problem but with passive mode. I can conect with WinSCP to an external FTP Server and it shows me the Folder Structure but in explorer it shows me Nothing and a message "page cannot be displayed"

    Thanks

    Friday, July 6, 2018 4:08 PM