Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
75 views13 pages

FTP Server

Uploaded by

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

FTP Server

Uploaded by

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

FTP SERVER CONFIGURATION

Sangay Chhophey (05230128)


Contents
Network Details: ........................................................................................................................................... 2
Installing vsftpd Package:.............................................................................................................................. 3
Assigning Static IP address to the server: ..................................................................................................... 5
Firewall:......................................................................................................................................................... 8
Managing FTP Server .................................................................................................................................... 9

1
Network Details:
Let's get started by setting up the FTP server on our virtual network. We'll begin by installing the
required package, followed by configuration and testing to ensure the server is functioning as
expected. The FTP server will be assigned the IP address 172.168.30.4/24.

Based on the provided instructions, begin by starting the devices in GNS3. Once the devices are
powered on, log into your CentOS-FTP-Srv. It’s recommended to manage the starting and
stopping of devices directly from GNS3 rather than using VirtualBox, as this ensures smoother
integration with the network simulation environment.

2
Installing vsftpd Package:
Before we assign static IP address (172.168.30.4) to the FTP server, we need to connect to the
internet to download the FTP packages. Making sure that the CentOS-FTP-Srv is connected to
the internet, we will install the package using the utility we used before (YUM). To configure an
Figure 1.0: The network FTP server, we need to install the vsftpd package from the repository
with root user’s privilege. Along with this package, other dependencies will be installed
automatically. Install the package using the following command:

# yum install vsftpd -y

3
To configure the server for anonymous access, follow these steps:

Open the configuration file using your preferred text editor. In this session, we will use
vim. Execute the following command to open the file:

After opening the file, search for the following options and modify their values as
required to allow anonymous users to access the service:

• anonymous_enable=YES
• local_enable=YES
• write_enable=YES

Once you have made the changes, your configuration file should look like the example
shown below.

4
Assigning Static IP address to the server:
To ensure the server can communicate with other devices on the network, we need to assign a
static IP address. Currently, the server is still using a dynamic IP address. As in previous steps,
we will use the nmtui utility to assign the IP address.

To do this, follow these steps:

Open the terminal and execute the following command to start the nmtui utility:

Within the nmtui interface, navigate to the option for Edit a connection.

Select the appropriate network interface, then set the static IP address to match the
network configuration.

Additionally, set the hostname as specified in the instructions.

5
If your interface is not activated, it is time to activate it. When you select the interface and it is
saying ‘Deactivate’ as shown below, it means the interface is activated.

Now, configure the IP address details of the server and make sure to tick ‘Automatically
connect’ button as shown below

6
Once the IP address details are being configured, make sure you can connect to the router’s IP
address (172.168.30.1).

7
Start and Enable vsftpd service:

We will start the vsftpd service and enable it so that the service starts every time it boots and

we don’t have to start the service every time.

# systemctl start vsftpd

# systemctl enable vsftpd

The service should start without any message if it is configured correctly. To see whether the

service is active, execute the following command:

#systemctl status vsftpd

Firewall:
The FTP service uses port 20 and 21 and we have to open the ports in the firewall to allow the

traffic and make the FTP service available in the network.

# firewall-cmd --permanent --zone=public --add-port=20-21/tcp

8
# firewall-cmd --permanent --zone=public --add-service=ftp

# firewall-cmd --reload

Managing FTP Server


You accessed the Network Connections window, which displays the available network
interfaces.
The Ethernet adapter is shown as connected, but it is listed under an "Unidentified
network," meaning it doesn’t have an IP address assigned yet or it's not recognized in
the current network configuration.

9
You opened the Ethernet Properties window for the selected Ethernet adapter.
In the Networking tab, you highlighted the Internet Protocol Version 4 (TCP/IPv4)
option, which controls the IPv4 settings for this network interface.
This step indicates you're preparing to configure the static IP address for this network
connection.

In the Internet Protocol Version 4 (TCP/IPv4) Properties window, you manually


configured the static IP address and other network details.

• IP Address: 172.168.30.11
• Subnet Mask: 255.255.255.0
• Default Gateway: 172.168.30.1
• Preferred DNS Server: 172.168.30.3

10
This setup allows the Windows machine to communicate with other devices in the
network, including the FTP server.

Navigate to FTP Directory:

• You changed the directory to the location where the FTP files are stored by
executing:

This took you to the FTP root directory on the server.

List Directory Contents:

• You ran the ls command to list the contents of the /var/ftp directory:

11
You then navigated to the pub directory, which is commonly used for storing publicly accessible
files via FTP. Inside the pub directory, you created a new directory named chopel.

Finally, you listed the contents of the pub directory again to confirm that the chopel folder was
created:

You should now see the chopel folder listed under the pub directory.

Once the directory was created on the FTP server, you likely accessed the FTP server from your
Windows machine and performed file operations (such as uploading or creating files under the
chopel folder). This concludes the process of setting up your FTP server and using it to manage

files remotely, allowing you to manage files between the server and the Windows machine.

12

You might also like