Home/Linux Administration/Real-World Projects
🏗️

Level 22 of 24

Real-World Projects

End-to-end builds: web servers, storage architecture, monitoring, hardened bastion hosts.

Individual lessons teach concepts in isolation; these projects combine multiple levels into a single, realistic build — closer to what an actual work request looks like than any single lesson can be.

Prerequisites

  • • Levels 1–21, as referenced per project

By the end of this level, you can

  • ✓ Combine networking, storage, security, and service management into one coherent build
  • ✓ Follow a project from architecture through verification and cleanup
  • ✓ Recognize which earlier levels a real-world task actually draws on

Project: Secure Ubuntu Web Server

Combining SSH hardening, firewall configuration, and Nginx into one production-shaped build. · 20 min

Architecture: a single Ubuntu Server VM running Nginx, reachable only via hardened SSH for administration and via HTTP/HTTPS for public traffic — every other port closed by default. This project deliberately combines Levels 9 (SSH), 10 (Firewalls), and 14 (Web Servers) into one coherent build, which is exactly the shape a real "set up a web server" work ticket actually takes — no single level in isolation.

Requirements: a fresh Ubuntu Server 24.04 VM; a non-root administrative user with sudo access; an SSH key pair already generated. Implementation order matters here specifically to avoid locking yourself out: set up the administrative user and confirm sudo access first, confirm SSH key-based login works in a second session before touching sshd_config, harden SSH (disable root login and password auth), enable the firewall allowing only 22/80/443 (confirming SSH is allowed before enabling), then install and configure Nginx to serve a test site.

Verification: confirm SSH key login works and password login is rejected; confirm `ufw status` shows exactly the three intended ports; confirm the site loads over HTTP; confirm any other port (test with a throwaway service on an unlisted port) is unreachable from outside. Cleanup: if this was a genuinely temporary lab VM, destroy it once verification is complete rather than leaving an unused, unpatched server running indefinitely — an idle, forgotten VM is itself a real security liability.

  • • Non-root admin user created with scoped sudo access (Level 4)
  • • SSH key-based login confirmed working before hardening sshd (Level 9)
  • • Root login and password auth disabled in sshd_config (Level 9)
  • • Firewall enabled with only 22/80/443 allowed (Level 10)
  • • Nginx installed and serving a test site (Level 14)
  • • Verification: an unlisted test port confirmed unreachable from outside

Takeaway: This exact build — hardened SSH + minimal firewall + a web server — is close to the actual minimum viable configuration for any real internet-facing Linux server, not just a training exercise.

Project: LVM Storage Architecture for a Growing Application

Designing storage that can grow without downtime, combining Levels 3 and 8. · 15 min

Architecture: an application server whose data directory needs to grow over time in unpredictable increments — the wrong approach is a single fixed-size partition sized by guesswork upfront; the right approach is LVM specifically because it supports growing a logical volume later without needing to have predicted the exact right size at creation time.

Implementation: build the PV → VG → LV chain from Level 8 with room to grow (either an oversized initial disk, or a VG designed to accept an additional PV later), format with a filesystem that supports online growth (ext4 or XFS), mount it via `/etc/fstab` referenced by UUID so the mount survives a reboot, and point the application's data directory at the mounted location.

Verification: write test data, confirm it persists across a reboot (proving the fstab entry is correct), then simulate growth by extending the LV and filesystem live (Level 8's `lvextend` + `resize2fs`/`xfs_growfs`) while the application keeps running, confirming zero downtime was required for the storage expansion — the entire point of choosing LVM over a plain partition in the first place.

  • • PV → VG → LV chain built with room to grow (Level 8)
  • • Filesystem chosen supports online (live) growth — ext4 or XFS
  • • Mount configured in /etc/fstab by UUID, survives reboot (Level 3)
  • • Growth simulated live without unmounting or stopping the application

Takeaway: The entire justification for choosing LVM over a plain partition is realized at exactly this moment — growing storage live, without downtime, because the architecture was built to allow it from the start.

Project: Basic Centralized Logging and Health Monitoring

Combining Bash scripting and logging so a failure surfaces before a user reports it. · 15 min

Architecture: a lightweight monitoring approach for a small deployment that doesn't yet justify a full observability platform — a scheduled Bash script (Level 13) checking disk usage, service status, and a basic HTTP health check, logging results in a way that survives the individual server (Level 12), and alerting (even just via a log entry or simple email/webhook) if a threshold is crossed.

Implementation: extend the disk-monitoring script pattern from Level 13's lab with a service-status check (`systemctl is-active <service>`) and an HTTP health check (`curl -f` against a health endpoint, checking its exit status). Schedule it via a systemd timer or cron to run every few minutes (Level 5's systemd knowledge applies directly to building the timer unit). Ensure output is logged somewhere that survives the individual server going down entirely — even appending to a file synced elsewhere, or emitting to the journal with a distinct identifiable tag, is a meaningful step up from "no record at all if the server itself is the thing that failed".

Verification: intentionally stop the monitored service and confirm the check correctly detects and logs the failure within one check interval; intentionally fill the test disk close to the configured threshold and confirm the disk-usage warning fires correctly; confirm a genuinely healthy state produces no false-positive alerts.

  • • Script checks disk usage, service status, and an HTTP health endpoint (Levels 12, 13)
  • • Scheduled via systemd timer or cron on a regular interval (Level 5)
  • • Output logged somewhere that survives the monitored server itself failing
  • • Verified against both an intentional failure and a genuinely healthy state (no false positives)

Takeaway: The real test of any monitoring setup is intentionally breaking the thing it monitors and confirming it actually catches the failure — a monitoring script that's never been tested against a real failure is an untested assumption, not a working safety net.

Sponsor / Advertisement