Module 10 - Assignment
Problem Statement: You work for xyz organization. Your job work is to manage Linux-based servers.
You have been asked to:
- Add a website with its IP address in the /etc/hosts file
- Ping it to check whether it is working fine
- Connect to that server using ftp and transfer a file from your pc to that server
- 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
-
Mapping
5.75.179.162
toftp_server
-
Pinging
ftp_server
-
Using
5.75.179.162
I’ll connect to the FTP server where I’ll uploadtest
file
Could have used ftp_server
instead of IP to connect as well
- 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: