0% found this document useful (0 votes)
11 views

Implementation

this is a project on the implentation of an ftp server

Uploaded by

joshtaffeu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Implementation

this is a project on the implentation of an ftp server

Uploaded by

joshtaffeu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Implementation of an FTP Server.

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:

FTP operates in two modes:


• Active Mode: The connection is established on two ports: 20 for command transmission
(control channel) and 21 for data transmission (data channel).
• Passive Mode: The connection is still established on two ports, but the difference is that
the data channel does not necessarily use port 21. Instead, the FTP server, when opening the
session, indicates the port on which the client must connect to establish the data channel and
thus allow data transmission.

Steps to Connect to an FTP Server:

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.

Setting up the FTP Server on CentOS:

Some important directories and files in the FTP configuration:

• /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).

The lines to modify in the vsftp.conf file are:

• Uncomment the following lines:


• Ascii_upload_enable=YES
• Ascii_download_enable=YES
• Chroot_local_user=YES
• Chroot_list_enable=YES
• Chroot_list_file=/etc/vsftpd/chroot_list
• LS_rescurse_enable=YES
• Listen=YES
• Listen=NO
• Add the following lines:
• Local_root=public_html
• Use_localtime=YES
• Seccomp_sandbox=NO

6. Create a user for an FTP connection.


7. Add users to the file.
8. Verify the server address.
9. Restart the FTP service.
10. Enable the FTP service on the firewall.
11. Edit the client’s IP settings.
12. Connect to the server using an FTP client.
13. Create a file to be imported to the server.
14. Import the file to the server.
15. Verify the importation on the server.

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.

You might also like