When enabled on the Windows Azure Virtual Machines Windows Server 2008 R2 virtual machine, most users will need to pass the files, programs, etc. on the needs of the cloud. Next, describes how Windows Server 2008 R2 in Windows Azure Virtual Machines enable the FTP file transfer service.
To demonstrate, we establish the named MyFTP Windows Server 2008 R2 virtual machine.
And external DNS name of this virtual machine is set to the My-FTP.cloudapp.net.
When after the start of the virtual machine, enter the Windows Server 2008 R2 virtual machines connected through Remote Desktop Remote Desktop. Just installed is completed, the entire Windows Server 2008 R2 without any installation roles (Role), as shown in the diagram below we can in the Server Manager, click Add Roles ready to add the new role.
Select the Figure marked Web Server (IIS), Microsoft’s IIS 7.5 has built-in FTP service, click after pressing the Next button.
IIS 7.5 includes a considerable number of additional services, the Figure marked at we must check install FTP Server add service finished, press the Next button.
At this point Windows Server 2008 R2 will begin the installation of IIS 7.5 FTP Server If the installation goes well we will see the following figure like the screen, you can press the Close button when we see a message that indicates the installation was successful.
IIS installation is complete, as shown on the left pane, expand the Server Manager, click the Web Server IIS management screen.
Before setting the FTP, we need to know about FTP connection mode, the vast majority of FTP file transfer software, Passive Mode, and when. FTP client software to connect to the FTP Server TCP Port 21 to request a connection, and the completion of the command the establishment of the channel. When both ends of the need to transfer data, FTP client software will send a PASV command through command channels to the FTP Server Passive Mode transmission mode requested access. FTP Server will then randomly select a TCP port (PS1) in the following figure, through command channels to tell the FTP client software, FTP client after just told FTP Server TCP Port (PS1) in the following figure to connect to FTP Server setting up a data channel (Data Channel). When all goes well, soon began to transfer files via the data channel (Data Channel).
Windows Azure foreign all network traffic will be through the load balancer (Load Balancer) virtual machine all external connections are required in the Windows Azure Management Interface add Endpoint current Windows Azure does not allow to set for some interval of TCP / UDP Port, only one add Endpoint, and a maximum of only 25 external Endpoint let Passive Mode FTP service to work properly, in addition, we also must limit shrinkage data channel (Data add to a TCP 21 Port Endpoint Channel) required TCP Port, or FTP Server a wide range of random establishment of the data channel TCP Port Windows Azure load balancing difficult operation.
Therefore, we next want to FTP Passive Mode will use the data channel TCP Port range is reduced limit of two TCP Port (Data Channel), add Endpoint order after the Windows Azure management interface. Please pay special attention to the left pane of the need to click on the correct FTP firewall settings, we can through the Server Manager, click the the following figure MyFTP server level.
Take over the data channel (Data Channel) TCP Port range shown for 5432-5433, complete the Apply button and then press the right pane. Accomplish this setup FTP Server will only be between two TCP Port randomly selected to data channel (Data Channel). The following figure in the External IP Address can be left blank.
Next, we can add FTP Site, as shown in the diagram below in the Connection pane, click Sites Right-click and select add new FTP Site.
Then we set the name of the FTP Site for Temp Files Upload, and physical folder set in the D: \ InstallFiles again remind the user in normal applications, FTP entity data folder must be built on a new virtual disk, do not the the FTP folder settings in the D: drive. Windows Azure Virtual Machines service each virtual machine’s C: drive by default in order to increase efficiency, will read and write to the disk cache turned on, open the write cache, FTP upload files in C : risk of missing write data on the disk, FTP file placed in temporary use D: drive is dangerous, the D: drive is the local hard drive, there is no automatic data backup one-third, especially when the virtual machine restart D: the contents of the disk will be lost, therefore only as a temporary use. In order to save space, this time we set up an FTP only to temporarily upload files to this virtual machine for software installation, FTP entity folder set in the D: drive, FTP entity folder must be set in the real application a new virtual disk, never set in the C: drive or D: drive.
Setting up the entity folder, as shown below do not need to use SSL encrypted transmission, same here only the FTP install the demonstration, please pay attention to the security problems of data transmission in real applications.
Next set to allow anonymous users (Anonymous) can log on to read and write to the file, the same in this only the FTP install the demonstration, in real applications, please pay attention to the setting of user access rights. After pressing the Finish button to complete the temporary file upload FTP Site.
Set properly named Temp Files Upload FTP Site, we turn to face a new problem, FTP Passive mode in the establishment of the data channel, we need to inform this virtual machine’s external IP Address FTP Server, in order to avoid FTP internal IPv4 address to an FTP client, which will cause the Windows Azure in the process of the establishment of the data channel in the door. As shown in the Connections pane, click Temp Files Upload FTP Site, and then in the right pane of the FTP FTP Site level firewall settings.
We can check in the Windows Azure Management Portal Foreign Public Virtual IP (VIP) 168.63.133.209.
Back to the Server Manager, the following diagram fill in this virtual machine within the External IP Address of Firewall the Foreign the IP Address: 168.63.133.209 finished, press the right side of the Apply button.
At this point, the FTP Server installation and configuration has been completed, these settings action is completed within IIS Manager, but all relevant firewall settings also affect to the system, it is recommended to restart this virtual machine, confirm that the entry into force of the relevant firewall settings missed this little trick wasted three hours of holiday time. The next we want to FTP used TCP Port setting in the Windows Azure Endpoint. A Windows Server 2008 R2 virtual machine just created, for safety reasons, only the Remote Desktop Remote Desktop Endpint has been established. + Button in the case in the following figure can increase other Endpoint.
Increase the new Endpoint picture, select Add endpoint.
Next most important added FTP Endpoint is TCP Port 21, the FTP command channel used in the TCP Port.
Then follow the same method, the FTP data channels need the TCP Port 5432 TCP Port 5433 into Endpoint after you’re done.
Next, I use free FTP software FileZilla to test the connection, as shown in the following figure like the type my-ftp.cloudapp.net Domain Name press the Connect button to connect to the cloud.
For Windows Server FTP operation and settings, you can refer to http://learn.iis.net/page.aspx/309/configuring-ftp-firewall-settings-in-iis-7/
Recent Comments