Implementation
Implementation
Introduction
FTP (File Transfer Protocol) is a protocol that, as the name suggests, is used to transfer files
between a client workstation and a remote server. In the following pages, we will further develop
its role, how it works, and how to set it up.
FTP Versions
FTP was created at a time when security was not a major concern. With increasing attacks over
the years, other versions have been developed, including:
• SFTP (SSH FTP): It uses the SSH (Secure Shell) protocol to protect file transfers between
computers by encrypting the connection through an SSH tunnel. The connection is made on the
SSH port, which is port 22 by default, ensuring that all information is securely transmitted over a
single connection.
• FTPS (FTP Secured): It adds the SSL protocol to FTP to secure communication between
the client and the server during file transfer. It was developed to address FTP security issues. FTPS
uses a control and data channel to transfer files and verifies the identity of the server through an
authentication certificate.
Role of FTP:
The FTP (File Transfer Protocol) is a protocol designed to enable the transmission of files between
systems. Once the FTP client is installed, it can be used to extract files from a server running the
FTP daemon (FTPd).
How it works:
To properly send files, the FTP protocol requires that two connections be maintained between
the client and the server: one connection for commands and responses and another for the
actual file transfer.
• The FTP client establishes the first connection to the server on TCP port 21. This
connection is used for control traffic, consisting of client commands and server responses.
• The client establishes the second connection to the server via TCP port 20. This
connection is dedicated to the actual file transfer and is maintained for each file transfer. File
transfer can be done in either direction, with the FTP client downloading a file from the server or
uploading it to the server.
Operating Modes:
To connect to an FTP server, you need an FTP client. There are several options:
• Filezilla
• WinSCP
• Cyberduck
• CoffeeCup Free FTP
Once you have an FTP client, you need the FTP server address, a username, a password, and the
session port, depending on whether it is in active or passive mode. The connection process varies
depending on the FTP client. In the practical case, we will present an example of connecting to an
FTP server with a client.
• /etc/vftpd/vsftpd.conf
• chroot_list: This is a file to be created in /etc/vsftpd to add users who can connect to
the FTP server.
Setup Process:
1. Configure the network in VirtualBox and place both stations on the same internal
network.
2. Update the packages.
3. Install the FTP daemon.
4. Activate the FTP service.
5. Edit the FTP configuration file (ftpd.conf).
Conclusion:
FTP is one of the oldest internet protocols. While simple, it does not fully protect file transfers
between the server and the client. However, with its other versions, such as SFTP and FTPS, this
concern is quickly addressed. Setting it up was somewhat complicated due to the lack of a precise
model for CentOS9. Therefore, we had to adapt and draw inspiration from the installation models
of CentOS8 and CentOS7.