USB Automounting with systemd

Objective Setting up automatic USB drive mounting on a Linux server using systemd mount and automount units Environment OS: Ubuntu Tools: system, USB drive Step 1 - Find Partition UUID Prerequisite: Plugin USB drive blkid /dev/sdb1 Note: UUID and filesystem type Step 2 - Create the Mount Unit sudo nano /etc/systemd/system/mnt-usb.mount Step 3 - Create Automount Unit sudo nano /etc/systemd/system/mnt-usb.automount Step 4 - Enable and Start sudo systemctl enable mnt-usb.automount sudo systemctl start mnt-usb.automount Step 5 - Verify and test Check the automount is active: ...

June 6, 2026 Β· 1 min

Centralized rsyslog server

Objective Build a centralized logging environment where: SERVER receives logs from client1 SERVER receives logs from client2 Logs are stored in separate files: /var/log/client1.log /var/log/client2.log Network Layout Host IP server 192.168.10.10 client1 192.168.10.101 client2 192.168.10.102 Environment OS: Ubuntu Tools: rsyslog Part 1 - Configure the rsyslog Server Verify rsyslog sudo systemctl status rsyslog Enable UDP Syslog reception and restart the rsyslog service sudo nano /etc/rsyslog.conf sudo systemctl restart rsyslog ...

June 4, 2026 Β· 1 min

DNS Lab - Dnsmasq, Client resolver, Caching

πŸ§ͺ DNS Lab πŸ“Œ Objective Understand DNS from a systems perpective βš™οΈ Environment Virtualization: VirtualBox OS: ( 1 DNS Server VM + 1 Client VM) πŸ› οΈ Lab Network Topology 🧩 Phase 1 β€” Direct DNS (No Cache) Client VM -> dnsmasq (192.168.10.10) Used for: Break #1 (Wrong DNS Server) Break #2 (Wrong DNS Record) 🧩 Phase 2 β€” Direct DNS (No Cache) Clint VM -> systemd-resolved (127.0.0.53) [CACHE] -> dnsmasq (192.168.10.10) [DNS SERVER] ...

May 5, 2026 Β· 2 min

Inter-Interface Packet Forwarding Failure Investigation

πŸ§ͺ Inter-Interface Packet Forwarding Failure Investigation πŸ“Œ Objective Diagnose why a client cannot reach the internet βš™οΈ Environment Virtualization: VirtualBox OS: ( 1 DHCP Server VM + 1 Client VM) πŸ› οΈ Lab Network Topology Server (DHCP) IP: 192.168.10.10 Interfaces: enp0s8 -> LAN enp0s3 -> NAT Client VM IP: 192.168.10.100 Interface: enp0s8 Gateway: 192.168.10.10 🚨 Incident Statement Client cannot access the internet πŸ” PHASE 1 β€” Verify the Problem Run on Client VM: ...

May 1, 2026 Β· 2 min

Process Management & Resource Control Lab

πŸ§ͺ Process Management & Resource Control Lab πŸ“Œ Objective Simulate and troubleshoot a real-world system slowdown caused by CPU saturation and memory exhaustion. βš™οΈ Environment Virtualization: VirtualBox OS: Ubuntu Server πŸ› οΈ Lab Setup Step 1 - Create CPU Load Script nano cpu_hog.sh chmod +x cpu_hog.sh Step 2 - Create Memory Load Script (Python) nano mem_hog.py chmod +x mem_hog.py 🚨 Incident Simulation Step 1 - Check the System Load Baseline uptime ...

April 24, 2026 Β· 8 min

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

Log Analysis & System Debugging

πŸ§ͺ Log Analysis & System Debugging Lab πŸ“Œ Objective Read system logs like real incidents Identify root causes Debug common system failures βš™οΈ Environment OS: Ubuntu Tools: journalctl, df, du, dmesg 🚨 Scenario 1: Service Crash Investigation Step 1 - Break the service sudo nano /etc/nginx/nginx.conf Add invalid line: invalid_directive; Restart: sudo systemctl restart nginx Step 2 - Investigate Check status: systemctl status nginx Check logs: sudo journalctl -u nginx -n 50 --no-pager ...

April 19, 2026 Β· 1 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