DHCP Lab: Setup, Failure Scenarios & Debugging Workflow

🧪 DHCP Lab 📌 Objective Understand how DHCP works in real network environment and how to debug common failure scenarios using a structured top-to-bottom approach. ⚙️ Environment Virtualization: VirtualBox OS: Ubuntu Server (1 DHCP Server VM & 2 Client VMs) Network mode: Internal Network + NAT (enp0s3 ignored for DHCP lab) 🛠️ Network Setup Interfaces DHCP Server enp0s8 -> 192.168.10.10/24 (Lab network) enp0s3 -> NAT Clients enp0s8 -> DHCP assigned IPs enp0s3 -> NAT (not used) ⚙️ Network Configuration (Netplan) Both server and clients are configured using Netplan, which defines interface behavior before DHCP starts. ...

April 23, 2026 · 3 min

Basic Network Setup & Connectivity

🧪 Basic Network Setup & Connectivity Lab 📌 Objective Understand how IP addressing, subnetting, and basic connectivity work in a controlled virtual environment. ⚙️ Environment Virtualization: VirtualBox OS: Ubuntu Server (2 VMs) Network mode: Internal Network + NAT VMs VM IP Address Role VM1 192.168.10.10/24 Client VM2 192.168.10.20/24 Server 🛠️ Setup Step 1 - Create Virtual Machines Create two Linux virtual machines: server_01 server_02 Recommended specs: 1 CPU 1-2 GB RAM 10+ GB disk Step 2 - Configure Network Both VMs must use the same Internal Network This ensures both machines are on the same isolated Layer 2 network. ...

April 22, 2026 · 3 min

Linux Networking

🧪 Linux Networking and Service Exposure Lab 📌 Objective This lab simulates real-world Linux networking issues and teaches how to troubleshoot: Service availability Port listening Firewall behavior (UFW) Binding (’localhost’ vs external access) Network-layer debugging ⚙️ Environment OS: Ubuntu (VM + Bridged Adapter) Service: Nginx Tools: ss, curl, ufw, systemctl Host machine for external testing (Powershell) 🟢 Stage 1 Verify service: systemctl status nginx Expected outcome: Active (running) Check listening ports: ...

April 20, 2026 · 3 min

Linux Permissions & Access Control

🧪 Linux Permission and Access Control Lab 📌 Objective To test how Linux file permissions and access control mechanisms work in a multi-user environment. ⚙️ Environment OS: Ubuntu Tools: chmod, chown, ls, groups, sudo Users: alice, bob, admin Groups: devs, managers 🛠️ Setup 1. Create Users sudo adduser alice sudo adduser bob sudo adduser admin 2. Create Groups sudo groupadd devs sudo groupadd managers Assign users: sudo usermod -aG devs alice sudo usermod -aG managers bob sudo usermod -aG devs admin sudo usermod -aG managers admin ...

April 18, 2026 · 3 min

Cron Job Automation

🧪 Cron Job Automation Lab 📌 Objective To build a scheduled automation script, observe its behavior, and learn how to debug failures. ⚙️ Part 1 - Script Setup Create a working directory: mkdir -p ~/cronlab cd ~/cronlab Create the script: nano backup.sh #!/bin/bash DATE=$(date +"%Y-%m-%d_%H-%M-%S") LOG_FILE="$HOME/cronlab/backup.log" SOURCE="$HOME" BACKUP_DIR="$HOME/cronlab/backups" exec >> "$LOG_FILE" 2>&1 echo "--- RUN $DATE ---" mkdir -p "$BACKUP_DIR" rsync -a --exclude="cronlab" \ "$SOURCE/" "$BACKUP_DIR/home-backup-$DATE/" echo "Backup finished" ...

April 17, 2026 · 2 min

Systemd Restart Behavior: Why Restart=on-failure Didn't Work

🧪 Systemd Service Restart Behavior Lab 📌 Objective To test and understand how systemd handles automatic service restarts using the Restart=on-failure policy. ⚙️ Environment OS: Ubuntu (systemd-based) Tools: systemctl, journalctl, bash 🛠️ Setup 1. Create a test script sudo nano /usr/local/bin/labtest.sh #!/bin/bash while true; do echo "lab service is alive: $(date)" sleep 10 done Make it executable: sudo chmod +x /usr/local/bin/labtest.sh 2. Create a system service sudo nano /etc/systemd/system/labtest.service [Unit] Description=Lab test service After=network.target [Service] ExecStart=/usr/local/bin/labtest.sh Restart=on-failure StandardOutput=journal [Install] WantedBy=multi-user.target Step 3 — Start the service sudo systemctl daemon-reload sudo systemctl enable labtest sudo systemctl start labtest systemctl status labtest ...

April 14, 2026 · 2 min

Grub2 Boot Recovery: Restoring a Server at 2AM

A step-by-step account of recovering a production server that dropped into the GRUB2 rescue shell at 2AM, resolved within SLA.

April 9, 2026 · 2 min