Unable to connect to FTP folder setup on Windows Server 2022 Azure VM

John Loh 0 Reputation points
2024-06-07T13:09:46.3+00:00

Hi, I've setup a FTP server in a Windows Server 2022 Azure VM. Everything is fine and I can connect to the FTP folder using FileZilla FTP client but I'm not able to connect to the FTP folder outside of the VM, example, from my laptop. Any ideas?

Thanks in advance.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,409 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,455 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sina Salam 5,711 Reputation points
    2024-06-07T14:18:36.61+00:00

    Hello John Loh,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you configured FTP server on Windows Server 2022 via Azure VM, you can connect to the FTP folder using FileZilla FTP client but you're unable to connect to the FTP folder outside of the VM.

    Solution

    If you're able to connect to the FTP server from within the Azure VM but not from outside, there are several potential issues to fix.

    1. On Azure Network Security Group (NSG) Configuration, allow port 21 and passive mode ports.
    2. In Windows Firewall check the settings and allow port 21 and passive mode ports.
    3. Also, in IIS FTP Configuration you will need to configure passive mode with the correct port range and public IP.
    4. In your FTP Client you will need to set it, so that it can use passive mode.
    5. Lastly: You will need to ensure the Azure VM where you have your FTP has a static public IP to avoid changes.

    Try all the above you should be able to connect to your FTP server from outside the Azure VM and let me know if you need step by step configuration for anyone you could not do.

    Accept Answer

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful ** so that others in the community facing similar issues can easily find the solution.

    Best Regards,

    Sina Salam


  2. MotoX80 32,531 Reputation points
    2024-06-11T12:47:36.2966667+00:00

    Hi, I couldn't find any passive mode when creating the port or in FTP server configuration. Where is it?

    It's on the client, not the server.

    User's image

    FTP is not secure. It transmits credentials in plain text.

    https://www.beyondsecurity.com/resources/vulnerabilities/ftp-clear-text-authentication

    You can have IIS use FTPS to encrypt the data, but some clients like ftp.exe do not support FTPS. And you still have to deal with the control and data channel connections

    https://www.integrate.io/blog/the-complete-guide-to-ftp-ftps-sftp-and-scp/

    User's image

    The better choice is to install the OpenSSH feature of Windows and use the SFTP protocol. The data is encrypted, and you only have to open port 22 in the firewall.

    https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=gui

    0 comments No comments