Module 10 - Assignment

Problem Statement: You work for xyz organization. Your job work is to manage Linux-based servers.

You have been asked to:

  1. Add a website with its IP address in the /etc/hosts file
  2. Ping it to check whether it is working fine
  3. Connect to that server using ftp and transfer a file from your pc to that server
  4. Install a web server and allow access to the port number of that server

FTP Portion

For this lab I created an FTP Server at free-ftp-server

Resolved the hostname eu-central-1.sftpcloud.io to IP at www.nsookup.io

  1. Mapping 5.75.179.162 to ftp_server

  2. Pinging ftp_server

  3. Using 5.75.179.162 I’ll connect to the FTP server where I’ll upload test file

Could have used ftp_server instead of IP to connect as well

  1. Install a web server and allow access to the port number of that server

In terminal I run:

sudo apt update -y #update packages
sudo apt install apache2 -y #install web server apache

Checking web server is up:

sudo systemctl status apache2

Getting server IP:

Enabling firewall

sudo ufw enable

If I check in browser page does not appear

Opening the necessary ports:

sudo ufw allow 80,443/tcp

When I check again page appears: