FTP On Windows Server | Setup FTP On IIS Server
Publish FTP Server On Windows Server 2022 with Real Scenario
Table of Contents
How To Configure FTP on Windows Server
In this article, we will see the real-world scenario of publishing FTP on Windows Server running IIS on Windows Server 2022.
Therefore, we will also see how to configure the FTP Server firewall.
So, we can also connect from the outside world to our FTP Server with the help of public IP.
You must have a static public IP to connect with your FTP Server from outside.
To configure the FTP for your IIS Windows web server. It is necessary to install the IIS and FTP server on your Windows server.
Here we will see how we can install the FTP Server and then we will set FTP on the IIS server
Moreover, will we also see how to connect securely to the FTP Server with a TLS connection.
So, let’s begin.
What is an FTP SERVER?
Ftp server full form is a File Transfer Protocol, it creates a secure connection between the server and the client to transfer the files.
Therefore, in simple words, it helps to transfer the files from the client to the server.
You can securely transfer your file to ftp server from any internet connection.
The best practice is to forward the port towards your FTP server instead of providing the direct public IP to your FTP Server.
Note: To transfer files from any internet, you should have a public static IP installed on your router, firewall, and NATting to FTP Server IP.
How to install an FTP Server
If you have already installed the IIS without installing FTP.
You need to check whether the FTP Server is installed or not.
Therefore, if you find FTP Server is not installed, then you have to install it on your web server.
Here in our case, we already installed the IIS Server but FTP is not installed.
So, we need to install FTP Server on our Windows Server 2022
Steps to Install the FTP on your Windows Server 2022
- First, open the Server Manager and click on Add Roles and features
- Then click on next by selecting the option Role-base or feature-based installation
- Select your Server Name and proceed with the next.
- Now you will see the Web Server IIS, click the drop-down and you will see the FTP Server.
- Check the FTP Server and click on next.
Again click on next and finally click on install. Restart the server if required.
Following the above steps will install the FTP Server on your Windows Web Server.
How to Configure FTP Server
Here in our case, we have installed an IIS server, and an FTP Server is also installed.
Therefore, we have also hosted one Demo site on our IIS web server with SSL installed (Testingo.in).
To know more about IIS SSL installation see how to install SSL on IIS Web Server
Now we want to configure FTP on Windows Server 2022.
We also have a public IP, so we will also configure the router firewall to forward the port to the FTP Server to access it securely from outside world.
Steps to Configure on Windows
Open IIS Manager, click on your site and Right Click on your hosted website and click on Add FTP Publishing.
You will see the following screen, you just need to click on next.
Make sure to check that, the start FTP Site automatically is checked with the required SSL option and the IP address is all Unassigned.
Also, we have created a user by the name of jack, who has permission from IIS_IUSRS
We will use this user name to connect with our FTP Server.
Make sure that Authentication is selected as Basic.
For security reasons select the allow access to the specified user. In our case, it is user “jack”
And check the permission to read and write. As shown in the image below.
Now click on finish and you will see the message FTP publishing is successful, just click on ok.
We have successfully installed and configured FTP Server Publishing for our IIS Web Server.
How to Connect FTP Server Locally (Internal Network)
As of now, we created the FTP publishing and now we want to connect with FTP to check if it’s working or not.
Note: Right now we will be able to connect locally only, not from the outside world.
To connect locally from the internal network, just download the FileZilla client from their official website.
After downloading and installing the FileZilla client, put the credentials of the specified user, in our case it is jack.
Once you enter the credentials, you will see the directory listing successful.
Note: Do not put any port in the port field, as by default it uses port 21 for ftp connection.
How to configure FTP Publishing from the Internet (Outside Network)
We have seen that, we have a successful connection with the FTP Server locally from the internal network.
However, if you want to connect it from the outside network, then what?
If you check the same connection credentials from outside the world network, you will get an error failed to retrieve directory listing as shown in the image below.
To configure it to access from outside the network we have to configure FTP Firewall settings.
Open IIS Manager click on the Server Name from the left side pane and open the FTP Firewall Support
Now we have to set the port range in the field Data Channel Port Range
Set the port to 49152-65535
Also, put your External IP Address of the Firewall as your public static IP installed on the router or firewall.
After setting this just click on apply.
Configure Router Firewall & Windows Firewall For FTP
You also need to allow these ports on your Windows Server firewall.
Open Windows Firewall with the help of the command firewall.cpl in a run box.
Click on Advance settings and Right-click on Inbound Rules to create a new rule.
Check the radio button on Port and click on Next.
Now put the value of the specified ports that we set on the IIS firewall.
Proceed with Next and Make sure “Allow the connection is selected”.
The next screen will be for Domain, private, and public, just click on next.
Finally, provide the Name of the Inbound rule such as IIS FTP Firewall Rule
Therefore, finish the wizard.
Note: The same thing you have to set on your router or firewall and forward these ports to the local IP of your IIS and FTP Web server.
Here I am using the local IP for my IIS server is 192.168.12.100
So, I forwarded Port 21 for FTP and Port Range 49152-65535 for the FTP Firewall to my local IP.
We have successfully opened the port and forwarded it to the specific IP Address.
So, now if we go and try to connect our SFTP Server from outside the network.
We will be able to connect securely with our SFTP Server.
Our connection is secure on TLS and the directory is listed successfully.
You can now download and upload your files to the Server easily.
The image below shows the successful connection from outside and I uploaded the pdf file successfully to the server.
Conclusion
In this article, we learned how to publish FTP on Windows Server 2022.
You should configure the FTP on a TLS connection for security and encryption.
Whenever you want to access the FTP from outside, make sure to set the firewall rule correctly.
Also, you need to forward the port to the FTP Server IP.
You may also like to Explore more IIS Server also see IIS Tutorials on Techi Jack
To see the article in action, watch the video below for how to publish FTP Server on Microsoft Windows Server 2022