Irfan Mohammed

Projects / Homelab

A homelab I’d be comfortable attacking

My home network doubles as my security lab. It’s segmented, it logs to a SIEM, and it tells me when something I run picks up a new CVE. Running it is how I practise what I do at work on a network where I control every layer.

Perimeter
OPNsense, VLANs, WireGuard ProtonVPN
Detection
SIEM log aggregation and alerting, CVE feeds
Hygiene
Nightly endpoint scans, Pi-hole DNS filtering
Automation
Scripted WireGuard client provisioning with QR codes

Why I built it

At work I see security tools from the alert and reporting layer: what the SIEM surfaces, what the EDR flags. I wanted to understand the layer underneath, meaning why a rule fires, what the logs look like before they’re parsed, and what a firewall rule actually allows. Running my own network is the cheapest way to get that, and it also protects the devices I actually live with.

Network design

Figure 1. Logical layout. VLAN names here are illustrative; the point is that each class of device sits in its own segment and only crosses through firewall rules.

Check this diagram against your real setup: VLAN names and IDs, which SIEM you run (for example Wazuh, Security Onion or Graylog), the scanner (for example OpenVAS/Greenbone or Nessus Essentials), and what the CVE alerts go to (ntfy, Discord, email). I’ll redraw it once you tell me.

Why this architecture

OPNsense as the firewall

I wanted a real stateful firewall with VLAN support, WireGuard built in, and a plugin ecosystem, not a consumer router’s checkbox interface. I’ve used both pfSense and OPNsense. I settled on OPNsense for its more frequent release cadence and its WireGuard integration.

Trade-off: one more box to patch and back up, and a misconfigured rule can take the whole house offline.

VLAN segmentation with default deny between segments

IoT devices are the most likely thing on my network to be compromised and the least likely to get patches. Putting them on their own VLAN with internet-only access means a compromised smart plug can’t reach my laptop or my lab. It’s the same blast-radius thinking as least privilege in identity.

Double-hop VPN: WireGuard home, then ProtonVPN out

On untrusted Wi-Fi my devices tunnel to home first, so they get Pi-hole filtering and access to the lab. Traffic then leaves through ProtonVPN, so my ISP and the sites I visit don’t see the same identity. Each hop sees only part of the path.

Trade-off: extra latency and two tunnels to troubleshoot.

Pi-hole for DNS

DNS filtering blocks ads, trackers and known malicious domains for every device, including the ones I can’t install software on. The query log is also one of the most useful data sources the SIEM has.

Scripted WireGuard provisioning

Adding a phone by hand meant generating keys, editing configs and typing them in. My script generates the key pair and client config and prints a QR code, so a new device is set up in a minute and every config follows the same template.

Detection and monitoring

Firewall, DNS and host logs go into the SIEM, which alerts on the things I care about. Separately, a CVE feed is matched against the software I run, so I hear about a vulnerability in my own stack the day it’s published. Nightly scans check every endpoint and flag new open ports or missing patches.

This is the same loop I run at work (advisory, affected systems, remediation, tracking), on a scale where I own every step.

Add one or two of your detection rules here, for example a KQL-style query or SIEM rule for repeated failed SSH logins, with a sentence on the false positives you had to tune out. Your co-op report set a goal of three detection rules (lateral movement, privilege escalation, exfiltration). If you’ve written them, they belong here.

Screenshots

What I learned

  • Logging everything isn’t detection. My first SIEM setup collected plenty and alerted on nothing useful. The value came from deciding which few things should wake me up and tuning out the rest.
  • Segmentation pays off in boring ways. Most of the benefit is just that a misbehaving device can’t reach anything important.
  • Automate the thing you’ll get wrong. Key handling is where I’d make mistakes by hand, so it was the first thing I scripted.

What’s next

  • Move configs into Git and manage services as code, with Docker Compose and Ansible.
  • AWS labs for the Solutions Architect exam (VPC design, IAM, CloudTrail, GuardDuty) built with Terraform.
  • Write and document detection rules for lateral movement, privilege escalation and exfiltration.