question

GTRAdmin-7970 avatar image
0 Votes"
GTRAdmin-7970 asked GitaraniSharmaMSFT-4262 commented

Can't connect to FTP from external machine

We are trying to create an FTP site on our Azure VM. Here are the steps we have taken: From the VM From Server Manager we added new features. Web Server (IIS), FTP Server, FTP Service From IIS we have added FTP site, setup FTP Firewall with data channel ports of 7157-7160 with external IP address as our VM Public IP, selected file folder for FTP We added port 21 and ports 7157-7160 to Windows Firewall as new inbound rules I restarted FTP service From Azure portal I selected VM and clicked on networking and added inbound port rule for FTP port 21 and FTP Data ports 7157-7160 Results: I can go to cmd prompt from VM and connect to ftp and pull directory but when I try to connect via filezilla outside the VM, it will not connect and times out. When using a port checking tool, port 21 fails. I can access port 3389 and 80 fine.

azure-virtual-network
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @GTRAdmin-7970 ,

Is the VM traffic flowing through an Azure Firewall?

And could you check what is the priority of the port 21 inbound rule on the VM's NSG. Is it being blocked by another rule?

You can also validate your FTP & port configuration by following the below blog:
https://www.c-sharpcorner.com/article/configuring-ftp-server-in-microsoft-azure/

Thanks,
Gita

0 Votes 0 ·
GTRAdmin-7970 avatar image
0 Votes"
GTRAdmin-7970 answered GitaraniSharmaMSFT-4262 commented

I am looking at my Azure portal and shows 0 items under firewalls.

Here is a list of inbound port rules:

73561-image.png



I followed the link you provided and it is setup.

When using a port checking tool, port 21 fails.


image.png (12.9 KiB)
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @GTRAdmin-7970 ,

Thank you for the update.

Is there any additional NSG on the VM subnet?
The inbound rules in the screenshot looks fine and you also mentioned that you added port 21 in Windows firewall. I understand port check on port 21 fails but may I know what happens if you do a psping to the private IP of this VM on port 21 from another VM in the same subnet?

Thanks,
Gita


0 Votes 0 ·
GTRAdmin-7970 avatar image GTRAdmin-7970 GitaraniSharmaMSFT-4262 ·

We only have 1 VM and only 1 NSG associated with 1 subnet and 1 network interface.

0 Votes 0 ·

Hello @GTRAdmin-7970 ,

I would request you to create a test VM in the same subnet and try a psping to the private IP of the FTP VM on port 21 and check if it succeeds. You can delete the test VM post testing immediately.

Thanks,
Gita

0 Votes 0 ·

Hello @GTRAdmin-7970 ,

Could you please provide an update on this post? Were you able to test the connectivity from a test VM as advised?

Thanks,
Gita

0 Votes 0 ·

Hello @GTRAdmin-7970 ,

I'm following up to check the current status of this issue. Please provide an update on this post to proceed further.

Thanks,
Gita

0 Votes 0 ·
AndreasBaumgarten avatar image
0 Votes"
AndreasBaumgarten answered

Hi @GTRAdmin-7970 ,

Did you open the required FTP ports in the OS Firewall on the FTP Server?

Are you able to connect to the FTP server from another Azure VM in the same subnet?


(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

Regards
Andreas Baumgarten


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.