Contents of Articles:
- FTP Server Use
- What Is The FTP Protocol And How It Works
- File Transfer Via FTP
- FTP Server Pros And Cons
- How To Create And Configure An FTP Server
- FileZilla Server
- Port Forwarding Configuring On The Router
- FTP Server Connecting
Many people don’t know what an FTP server is in reality. An FTP server, also known as a file server, is a computer used to transmit data through the FTP protocol. It handles client requests, checks their privileges, and grants permissions for downloading or uploading files. Clients can control the data transfer by issuing specific commands. As we explore the intricacies of FTP servers in this article, it's worth noting that a related topic is covered in-depth in our piece titled 'What is the FTP standard and where is it used?'.
FTP Server Use
FTP servers are preferred for remote file sharing because they enable efficient data transmission by transferring only files without service information, unlike HTTP. This capability results in faster data exchange.
Additionally, FTP servers are commonly used for data backup due to their reliability and cost-effectiveness. Understanding the FTP protocol is essential for comprehending the complexities of data backup.
What Is The FTP Protocol And How It Works
FTP is a method for transferring files between a server and a client over a network. It functions as an application layer protocol in the OSI model. It allows users to directly send and receive files, making it a convenient tool for sharing data.
FTP has two distinct data channels: the command and the data channel.
The command channel is responsible for transmitting messages related to server-client actions. The data channel is necessary to transfer content, excluding any service information or commands.
File Transfer Via FTP
FTP supports active and passive operating modes. The session setup algorithm depends on the choice.
- The client initiates a connection with the server by sending a request from a port P, which is not within the standard port range (P > 1024), to port 21 on the server.
- Upon receiving the request, the server generates a response and sends it back to the client's port A.
- The data transfer then occurs through port 20, with the client's port being A+1.
If there is a firewall on the transmission path, using active mode may not be possible, and in such cases, firewall rules need to be reconfigured.
- The client establishes a connection with the server and indicates the need to operate in passive mode. Port 21 remains in use in this case. The request is sent from a port P, which is greater than 1024.
- The server determines a non-standard port X for the data channel (X > 1024) and sends a response to port P with the port number X.
- To transfer data, the client establishes a connection from port P+1 to port X.
Note. Secure connections can be established through protocol modifications, as the current data transfer using the Telnet protocol is considered unsafe due to the absence of encryption for transmitted data.
Clients are verified when connecting to the server. It’s necessary to verify the authenticity of the user. Basic authorization may not provide an adequate security level when dealing with confidential information.
As previously stated, using FTP may not ensure a secure connection as it does not encrypt traffic, leaving names, passwords, and files vulnerable to interception by hackers.
Alternative protocols such as SFTP, FTPS, or FTPES can be used to address this issue. These protocols use encryption to protect data and minimize the risk of unauthorized access.
FTPS- And SFTP Protocols
FTPS is the same FTP protocol, but with the feature to create encrypted sessions using the SSL/TLS protocol.
SFTP is a separate protocol based on the SSH protocol. It fully encrypts traffic.
FTP Server Pros And Cons
Pros of Using an FTP Server:
- Fast data transfer. FTP allows for quick transfer of large volumes of data. The absence of encryption and system data recording enhances the speed of the transfer process.
- Simultaneous file transfer. Users can transfer any files really fast.
- Resumable transmission. If a file transfer is interrupted, FTP supports seamless recovery. Users can resume the transfer from where it was interrupted using the
restcommand, eliminating the risk of losing progress.
Cons of Using an FTP Server:
- Low security rate because FTP does not use cryptographic methods.
- Vulnerability to attacks. FTP servers do not authenticate the sending source, leaving them open to hacker attacks, such as Distributed Denial of Service (DDoS) attacks, compromising the server's stability and availability.
- Limited user activity tracking. It can be challenging to monitor and track the server’s activity, making it difficult to identify and address any potential security breaches or malicious activities.
How To Create And Configure An FTP Server
Here is the way to create an FTP server while using OS Windows:
- To begin the process, navigate to the Control Panel and locate the Programs and Features section.
- Select Enable or Disable Windows components.
- Open IIS, the FTP server, and enable the Extensibility of FTP and the FTP Service. It’s also necessary to check the Website Management Tools folder and enable the items IIS Management Console and Service.
- Configure the FTP server. Select the Administration section in the control panel.
- Open the IIS Service Manager.
- Expand the left list on the Sites section, then select Add FTP site.
- Write down the server name and choose the directory.
- Specify the IP address.
- Choose to use login/password verification or anonymous.
- Configure the Windows Firewall. Choose the control panel to do this.
- Go to the advanced settings, expand the Rules for Incoming Connections item, find Incoming FTP traffic, and enable it.
Clients can join the server themselves if they follow the steps below:
- Open the Administration section and select Computer Management in the Control panel.
- Open the Local Users item, expand the Groups folder, and click on Create a Group.
- Add specific users to the group or create new ones by clicking on the Local Users field.
You can create an FTP server while using utilities. The simplest and rather convenient is FileZilla Server. This solution also supports SSL, which guarantees the security of data transmission.
- Download FileZilla Server. Select the administrator port or use the suggested during installation.
- Launch the program and connect to the server as an administrator. Log in to the system.
- Open Server-Configure. Write the necessary addresses for the server.
- Make a new user in the Rights management section.
- Enter the virtual path to the directory in the Virtual path. Enter a backslash to get to the root of the folder right away. Write the full directory to the file folder in the Native path.
- Go to the Network Configuration wizard section. It is possible to define the scope of ports to be used and also assign an external IP address for users to connect.
Port Forwarding Configuring On The Router
The FTP server requires two types of ports to work:
- the control port (it is used 21 pcs by default);
- the data transfer ports.
Enter the fixed server address and set port 21 as both external and internal ports to work with the router.
Repeat this process to establish a second rule, but this time, input the range of ports employed by the server for both external and internal ports.
FTP Server Connecting
There are several ways to do it. It’s necessary to know them to choose the best one in your case.
Via Windows Explorer
Enter the following path into the file explorer's address bar:
ftp://<hostname>. Then, provide the user's login credentials in the new window. The explorer window should display the server's files and directories available for FTP.
Through the browser
The instruction is similar to the previous one.
Via FileZilla Client
Download FileZilla Client and use the site manager to define the scope of ports and assign an external IP address to connect to an FTP server. Input the server's IP address and port as the host, followed by your login details. Once connected, the program's left window will display the contents of the FTP server.
Setting up and using an FTP server is a straightforward process that enables fast work with the data. However, it has a low security level. The problem is ready to be solved while using alternative protocols like FTPS or SFTP to address the issue.