FTP is an essential component when it comes to connecting with remote machines and servers – virtualization infrastructure is no exception. This article will provide simple and essential steps required to setup FTP on an Azure Virtual Machine. This process is defined for configuring an FTP server on Windows Server 2012 virtual machine on Azure.
First of all, you need a virtual machine. You can create a ‘Windows Server 2012’ machine instance from pre-available Azure templates. Once the machine has booted, you can connect to it using RDP from Azure Management Portal.
After the connection is setup, you will need to configure IIS. For that, you need to add Web Server (IIS) role to the server, select the required features and add a TCP endpoint to your VM in the management portal with public and private port 80. To enable FTP, make sure to enable the ‘FTP Server’ role services for the IIS role
Now that IIS is setup the next step is to create an actual FTP site in IIS. Using the ‘Sites’ option in IIS Manager, add the created FTP site and specify the name and the local path for the site. You should also add binding and SSL information and optionally define who should have access to the FTP site. Now you can access the FTP site from within the VM.
For active FTP you need to allow access to ports 21 (FTP command port) and 20 (FTP data port) so you need to add two endpoints to your VM.
For passive FTP you need to define IIS FTP server the port range it can use for data connections and to add endpoints to the VM that correspond to this port range. Now, configure the port range and external IP address for passive data connections. The external IP address should be the Virtual IP address you can find in the Azure Management portal.
If you cannot specify the data channel port range in the IIS Manager use the appcmd utility, which can be found in %windir%\system32\inetsrv:
appcmd set config /section:system.ftpServer/firewallSupport /lowDataChannelPort:7000 /highDataChannelPort:7014
Lastly, the Windows firewall seems to allow all traffic that is required, it is better to enable stateful FTP filtering on the firewall:
netsh advfirewall set global StatefulFtp enable
Once the firewall in configured, you can restart the FTP Windows service to start your FTP.
Monitor and Automate Azure Virtual Machines and Virtual Network with CloudMonix
Azure Windows and Linux Virtual Machine Monitoring
CloudMonix extends Azure Virtual Machines by providing sophisticated mechanisms to monitor, auto-scale and automate Azure Virtual Machines. CloudMonix hooks into Azure Diagnostics or utilizes a light-weight self-updating agent to provide insight into a wide variety of key performance indicators, logs and more. CloudMonix allows users to automate numerous recovery procedures thru its integration with Azure Management API and Azure Automation.
Azure Virtual Network Monitoring
CloudMonix provides a unique set of monitoring features for Microsoft Azure Virtual Networks. Always know that we are keeping tabs on the most important information and presenting it to you in dashboards, charts and reporting.
- Track Egress and Ingress
- Know when Azure Gateways disconnects
- Self-heal with on-demand Azure Automation