Introduction to Linux Lab
Ubuntu Server LTS Lab Activity for Cybersecurity
Objective
This lab activity is designed to introduce undergraduate cybersecurity students to Ubuntu Server LTS, focusing on basic system administration, security configurations, and common cybersecurity tools in a server environment.
Prerequisites
VMware Workstation Player installed on your computer
Ubuntu Server 22.04 LTS ISO file downloaded (or the latest LTS version available)
Part 1: Setting up the Ubuntu Server Virtual Machine
Step 1: Create a New Virtual Machine
Open VMware Workstation Player
Click on "Create a New Virtual Machine"
Choose "Installer disc image file (iso)" and select your Ubuntu Server ISO
Follow the wizard, allocating at least 20GB of disk space and 2GB of RAM
Step 2: Install Ubuntu Server
Start the virtual machine and follow the Ubuntu Server installation prompts
Choose to install Ubuntu Server (minimized installation)
Configure network settings (DHCP is usually fine for this lab)
Set up a username and password for the administrator account
Choose to install OpenSSH server when prompted
Do not select any additional featured server snaps
Step 3: Update the System
After installation, log in with your credentials
Update the package list and upgrade installed packages:
Part 2: Basic System Administration
Step 1: User Management
Create a new user:
Add the new user to the sudo group:
Switch to the new user:
Step 2: File Permissions
Create a directory and a file:
Change permissions:
Verify permissions:
Part 3: Basic Security Configurations
Step 1: Configure the Firewall
Check firewall status:
Enable the firewall:
Allow SSH:
Step 2: Secure SSH
Edit SSH configuration:
Make the following changes:
Change
PermitRootLogin
tono
Set
PasswordAuthentication
tono
Set
MaxAuthTries
to3
Restart SSH service:
Part 4: Installing and Using Cybersecurity Tools
Step 1: Install Nmap
Install Nmap:
Perform a basic scan (replace with a safe, authorized IP):
Step 2: Install and Configure Fail2ban
Install Fail2ban:
Copy the configuration file:
Edit the configuration:
Find the
[sshd]
section and setenabled = true
Restart Fail2ban:
Part 5: Log Analysis
Step 1: Examine System Logs
View the system log:
Search for SSH-related entries:
Step 2: Monitor Real-time Logs
Use the
tail
command to monitor logs in real-time:In another terminal or from another machine, attempt to SSH into the server and observe the log entries
Part 6: Basic Web Server Setup
Step 1: Install Apache Web Server
Install Apache:
Allow HTTP traffic through the firewall:
Step 2: Configure a Basic Web Page
Edit the default web page:
Add some basic HTML content:
Save and exit the editor
Step 3: Access the Web Server
From another machine on the network, open a web browser and navigate to the IP address of your Ubuntu Server
Conclusion
In this lab, you've learned how to set up an Ubuntu Server LTS virtual machine, perform basic system administration tasks, configure security settings, install and use common cybersecurity tools, and analyze system logs. You've also optionally set up a basic web server. These skills form a foundation for further exploration of Linux servers in cybersecurity contexts.
Last updated