Case Study · Infrastructure & Observability
Segmented Homelab & Multi-Layer Observability Stack
Building a VLAN-segmented Proxmox VE homelab with OPNsense routing, physical DNS failover, out-of-band Prometheus/Grafana metrics, and zero-trust remote access.
- Proxmox VE
- OPNsense
- Prometheus & Grafana
- Pi-hole
- Cloudflare Zero Trust
- Docker & Forgejo
1. The Challenge
Running production automation workflows, private Git repositories, and resource-heavy sandbox workloads on a flat consumer home network introduces three immediate risks:
- Zero isolation: A flat ISP router places smart-home devices, personal workstations, and self-hosted servers in the same broadcast domain—and standard ISP gateways cannot route 802.1Q tagged VLANs.
- Single points of failure: Virtualizing network services like DNS or monitoring on the same hypervisor creates a circular dependency: if the server reboots or crashes, household DNS drops and local alerting goes down with the machine it was supposed to watch.
- Credential sprawl & exposed ports: Opening router ports invites constant scanning, while pasting SMTP passwords into every new container or hypervisor turns credential rotation into a maintenance headache.
2. System Architecture
I built a tiered, defense-in-depth homelab on a dual-NIC Proxmox VE host (ZFS RAID1 NVMe storage) paired with an 8-port managed switch and a dedicated physical failover node:
- Dual-NIC Virtual Routing & 802.1Q Segmentation (OPNsense + Managed Switch): Proxmox bridges its primary Intel NIC to the upstream ISP gateway (keeping household Wi-Fi and hypervisor management untouched) while dedicating its second NIC as a VLAN-aware 802.1Q trunk into a TP-Link Omada managed switch. An OPNsense VM handles DHCP, Unbound DNS, and stateful firewalling across VLAN 10 (Trusted Workstations) and VLAN 20 (Isolated Servers)—blocking server-to-workstation and server-to-WAN-LAN lateral movement by default.
- Physical Out-of-Band DNS Failover (Dual Pi-hole): OPNsense Unbound forwards upstream DNS queries to two Pi-hole instances: a primary Debian LXC on Proxmox and a secondary physical Raspberry Pi 1B wired directly to the switch. If Proxmox reboots for maintenance, household and lab DNS fail over automatically to the Raspberry Pi.
- Workload Isolation & Private Docker Networking (VLAN 20): Production services (
apps-prod), a dedicated game server VM, and a testing sandbox (dev-sandbox) run in separate VMs with default-deny Proxmox VM firewalls. Insideapps-prod, containers—including n8n, Gotenberg, Uptime Kuma v2, Homepage, and Forgejo—communicate over an internal Docker bridge so internal microservices remain unreachable from the LAN. - Out-of-Band Observability & Unified Alerting: Prometheus and Grafana run in their own dedicated Debian LXC container (
observability), scraping Node Exporter metrics from the Proxmox host, Linux VMs, and OPNsense’s FreeBSDos-node_exporterplugin (bound strictly to the VLAN 20 interface).
3. Key Engineering Decisions
Centralizing Alerts Through One Webhook Vault
Rather than storing SMTP credentials inside Proxmox, Grafana, and Uptime Kuma separately, all three tools fire standardized JSON payloads to a single self-hosted n8n Homelab Alert Dispatcher webhook. Proxmox VZDump backup results, ZFS health notices, Uptime Kuma checks, Grafana threshold alerts (Disk >85%, RAM >90%, CPU >90%, Host Target Down), and n8n workflow error triggers all flow through one formatting pipeline using a single isolated credential.
Closing the Physical-Outage Blind Spot
Local monitoring has one classic flaw: if the Proxmox host loses power or the ISP line drops, local Grafana and n8n containers go offline together and can never fire an alert. To close that gap, I enabled Cloudflare Zero Trust Tunnel Health Alerts routed directly to email at Cloudflare’s edge—bypassing the local webhook completely so power and ISP outages still trigger immediate notifications.
Path-Specific Cloudflare Zero Trust Access
External access to dashboards (status, usage, home) and automation endpoints runs exclusively over outbound Cloudflare Tunnels with zero inbound ports forwarded on the home router. Cloudflare Access locks administrative web UIs (including the n8n editor and Homepage) behind Google OAuth2 at the edge, while path-specific Bypass rules allow automated /webhook/* payloads and /healthz probes to pass through cleanly.
Git-Backed Runbooks & Disaster Recovery: All VMs and LXCs—including OPNsense, Pi-hole, and the observability LXC—run on automated Proxmox VZDump schedules mirrored off-site via Rclone. Architecture notes, Mermaid network diagrams, and exported workflow JSON files live in an Obsidian vault synced over local SSH to a self-hosted Forgejo instance, keeping full disaster-recovery docs available offline on the workstation even if the server is down.
4. Lessons Learned
- Keep management out of the blast radius: Leaving Proxmox’s primary management interface on the untouched upstream bridge meant I could build, test, and break OPNsense VLAN rules without ever risking a hypervisor lockout.
- Test failover by actually pulling the plug: Shutting down the primary Pi-hole LXC and running uncached
nslookupqueries proved that OPNsense Unbound pivoted cleanly to the Raspberry Pi rather than just serving stale RAM cache. - Separate monitoring from what it monitors: Running Prometheus and Grafana in a dedicated LXC—and pairing them with an external edge tunnel-disconnect alert—ensures you still have visibility before, during, and after a VM crash.
