<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Networking |</title><link>https://integraceion.com/tags/networking/</link><atom:link href="https://integraceion.com/tags/networking/index.xml" rel="self" type="application/rss+xml"/><description>Networking</description><generator>HugoBlox Kit (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Wed, 12 Aug 2026 00:00:00 +0000</lastBuildDate><image><url>https://integraceion.com/media/icon_hu_623a664287f5d0d2.png</url><title>Networking</title><link>https://integraceion.com/tags/networking/</link></image><item><title>Declarative Infrastructure &amp; Cloud-Native Homelab</title><link>https://integraceion.com/projects/iac-homelab/</link><pubDate>Wed, 12 Aug 2026 00:00:00 +0000</pubDate><guid>https://integraceion.com/projects/iac-homelab/</guid><description>&lt;p&gt;I maintain a highly customized self-hosted homelab environment to run infrastructure services, containerized workloads, and automated GitOps pipelines. What began as a simple collection of self-hosted apps has evolved into a strict, declarative Infrastructure-as-Code (IaC) repository built to simulate enterprise-grade, high-availability data center operations on personal hardware.&lt;/p&gt;
&lt;p&gt;This documentation covers the architecture, automated provisioning, complex network routing, container orchestration, observability, security, and secret management across my physical and virtual environments.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="-architecture--network-topology"&gt;🏗 Architecture &amp;amp; Network Topology&lt;/h2&gt;
&lt;p&gt;The infrastructure is logically split to isolate public-facing services from internal production and testing workloads. At the core, &lt;strong&gt;Proxmox VE&lt;/strong&gt; provides the virtualization backbone. &lt;strong&gt;TrueNAS SCALE&lt;/strong&gt; manages the ZFS storage arrays, providing highly available NFS/SMB shares to the cluster. The physical layer utilizes a MikroTik switch featuring 2.5 Gigabit ports to ensure high-speed throughput between the virtualization nodes and the storage backend without bottlenecks.&lt;/p&gt;
&lt;h3 id="logical-network-segmentation"&gt;Logical Network Segmentation&lt;/h3&gt;
&lt;p&gt;Traffic is strictly segmented and routed via an &lt;strong&gt;OPNSense&lt;/strong&gt; edge firewall using VLANs. To enforce a zero-trust physical layer, all unused switch ports remain unassigned and disabled by default.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Management VLAN:&lt;/strong&gt; Subnet specifically hosting hardware &amp;amp; key infrastructure administration panels such as Proxmox Graphical User Intreface, OPNSense Admin Console and the Managed Switch User Interface.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Production VLAN:&lt;/strong&gt; Internal core services. Hosts Kubernetes clusters, Docker workloads, PostgreSQL/Redis databases, monitoring systems, NVR technologies, Smart Home Core, and infrastructure APIs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DMZ VLAN (Public Edge):&lt;/strong&gt; Hosts VPN endpoints and externally accessible services such as Nextcloud, Immich, and Vaultwarden, exposed securely through Cloudflare tunnels.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IoT VLAN:&lt;/strong&gt; Isolated smart home devices hosting Home Assistant, Zigbee2MQTT, Node-RED, and MQTT brokers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test VLAN:&lt;/strong&gt; Ephemeral environments for Kubernetes test clusters, CI/CD agents, and database staging mirrors.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IP Cameras VLAN:&lt;/strong&gt; High-bandwidth subnet for IP cameras, blocking internet access and granting incoming access only to the NVR.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;User VLAN:&lt;/strong&gt; Trusted personal devices with internal DNS access and controlled access to selected Production and IoT services.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Guest VLAN:&lt;/strong&gt; Untrusted personal devices with internal DNS access, isolated from the rest of the network.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="high-level-topology-schema"&gt;High-Level Topology Schema&lt;/h3&gt;
&lt;div class="mermaid"&gt;graph TD;
Internet((Internet)) --&gt; ISPRouter["ISP Router"];
Cloudflare((Cloudflare)) &lt;--&gt;|Secure Tunnel| CFTunnel["CF Tunnel"];
ISPRouter --&gt; OPNSense["OPNsense Firewall"];
subgraph "Homelab Infrastructure"
OPNSense --&gt;|802.1Q Trunk| CoreSwitch["2.5G Managed Switch"];
%% First row of 4
subgraph "Core VLANs"
MGMT["Management"]
PROD["Production"]
DMZ["DMZ"]
TEST["Test"]
end
%% Second row of 4
subgraph "Endpoint &amp; Client VLANs"
IOT["IoT"]
IPCAM["IP Cameras"]
USER["User"]
GUEST["Guest"]
end
%% INVISIBLE LINK: Forces the Endpoint group to stack directly under the Core group
TEST ~~~ IOT
%% Switch Routing
CoreSwitch --&gt; MGMT
CoreSwitch --&gt; PROD
CoreSwitch --&gt; DMZ
CoreSwitch --&gt; TEST
CoreSwitch --&gt; IOT
CoreSwitch --&gt; IPCAM
CoreSwitch --&gt; USER
CoreSwitch --&gt; GUEST
%% DMZ Flow
DMZ --&gt; TraefikDMZ["Traefik &amp; CrowdSec&lt;br&gt;(DMZ)"]
CFTunnel &lt;--&gt; TraefikDMZ["Traefik &amp; CrowdSec&lt;br&gt;(DMZ)"]
%% Production Flow
PROD --&gt; TraefikPROD["Traefik &amp; CrowdSec&lt;br&gt;(PROD)"]
PROD --&gt; Authentik["Authentik"]
PROD --&gt; NVR["NVR"]
%% Specific Routing
Authentik --&gt; OIDC["OIDC Provider"]
NVR -.-&gt;|Camera Streams| IPCAM
%% OIDC Authentication Flows
TraefikDMZ -.-&gt;|Auth| OIDC
TraefikPROD -.-&gt;|Auth| OIDC
end
&lt;/div&gt;
&lt;hr&gt;
&lt;h2 id="-infrastructure-automation--gitops"&gt;⚙️ Infrastructure Automation &amp;amp; GitOps&lt;/h2&gt;
&lt;p&gt;To eliminate configuration drift, manual intervention is strictly minimized. The environment is provisioned and maintained through automated pipelines defined in my IaC repository.&lt;/p&gt;
&lt;h3 id="provisioning-pipeline"&gt;Provisioning Pipeline&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Packer:&lt;/strong&gt; Bakes immutable, pre-configured base OS templates.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Terraform:&lt;/strong&gt; Consumes Packer templates for rapid, declarative provisioning of Proxmox VMs and LXC containers based on environment state files.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ansible:&lt;/strong&gt; Bootstraps and configures fresh VMs and LXCs, handling system setup, user creation, SSH key distribution, Docker runtimes, and TrueNAS storage integration, while serving as the configuration engine for ongoing system updates.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="gitops-workflow-schema"&gt;GitOps Workflow Schema&lt;/h3&gt;
&lt;div class="mermaid"&gt;sequenceDiagram
participant Dev as Developer
participant Git as Git Repository
participant Pipeline as CI/CD (GitLab/GitHub)
participant Infra as Proxmox / K8s / Docker
Dev-&gt;&gt;Git: Push IaC or Config Changes
Git-&gt;&gt;Pipeline: Trigger Webhook
Pipeline-&gt;&gt;Pipeline: Linting &amp; SOPS Decryption
Pipeline-&gt;&gt;Infra: Terraform Apply / Ansible Playbooks
Infra--&gt;&gt;Pipeline: Confirm State
Pipeline--&gt;&gt;Dev: Discord Notification (Success/Fail)
&lt;/div&gt;
&lt;hr&gt;
&lt;h2 id="-security-access--identity"&gt;🔒 Security, Access &amp;amp; Identity&lt;/h2&gt;
&lt;p&gt;Security is enforced at the edge, the application layer, and the container runtime. Container workloads are heavily hardened; the Docker socket is explicitly &lt;strong&gt;not&lt;/strong&gt; mapped to containers unless absolutely required, and is instead routed through a secure &lt;code&gt;socket-proxy&lt;/code&gt;, reducing exposure to container-based privilege escalation.&lt;/p&gt;
&lt;h3 id="unified-edge-security--waf"&gt;Unified Edge Security &amp;amp; WAF&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Traefik Proxy &amp;amp; Automatic TLS Management:&lt;/strong&gt; Acts as the sole entry point for web traffic, routing dynamically based on container labels and automating Let&amp;rsquo;s Encrypt wildcard certificate management through DNS challenges.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CrowdSec WAF:&lt;/strong&gt; Deployed across Traefik ingress proxies and the OPNSense firewall. This provides collaborative, behavior-based intrusion prevention against brute-force attacks, port scans, and malicious payloads.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="identity--secrets-management"&gt;Identity &amp;amp; Secrets Management&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Authentik OIDC:&lt;/strong&gt; Serves as the central Identity Provider (IdP) for local and public endpoints, shielding services behind strict, unified authentication flows.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SOPS &amp;amp; Age:&lt;/strong&gt; Repository secrets such as API keys, database passwords, and TLS material are encrypted in Git using Mozilla SOPS. A single, heavily secured Age key is required to decrypt the environment, balancing strong secret protection with operational simplicity.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="zero-trust-remote-access-vpn--mesh"&gt;Zero-Trust Remote Access (VPN &amp;amp; Mesh)&lt;/h3&gt;
&lt;p&gt;Access to the homelab is handled transparently across multiple physical locations:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Site-to-Site WireGuard:&lt;/strong&gt; An OPNSense WireGuard server connects remote OpenWrt routers at secondary locations. Clients connecting to specific Wi-Fi SSIDs at these locations are seamlessly bridged into the homelab mesh, requiring zero client-side configuration.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tailscale ACLs:&lt;/strong&gt; Administrative access is governed by Tailscale with strict, tag-based Access Control Lists (ACLs):
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;group:admin&lt;/code&gt; maintains unrestricted SSH and service access to all tagged environments.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;group:family&lt;/code&gt; is restricted to accessing web interfaces for &lt;code&gt;tag:dmz&lt;/code&gt; self-hosted applications.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;group:guest&lt;/code&gt; is explicitly denied access to internal resources.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h2 id="-observability--notifications"&gt;📊 Observability &amp;amp; Notifications&lt;/h2&gt;
&lt;p&gt;System telemetry and alerts are centralized to ensure high availability, rapid incident response, and continuous performance tuning.&lt;/p&gt;
&lt;h3 id="monitoring-ecosystem"&gt;Monitoring Ecosystem&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The Classic Stack:&lt;/strong&gt; &lt;strong&gt;Prometheus&lt;/strong&gt; aggregates hardware and container metrics through &lt;strong&gt;Node Exporter&lt;/strong&gt; and cAdvisor, which are visualized through highly customized &lt;strong&gt;Grafana&lt;/strong&gt; dashboards. InfluxDB is utilized for specific long-term time-series data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hypervisor &amp;amp; System Monitoring:&lt;/strong&gt; &lt;strong&gt;Pulse&lt;/strong&gt; is deployed specifically for deep-dive Proxmox VE telemetry, alongside &lt;strong&gt;Beszel&lt;/strong&gt; for lightweight, real-time system monitoring.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Container Management:&lt;/strong&gt; &lt;strong&gt;Komodo&lt;/strong&gt; is utilized for managing Docker stacks and provides its own native alerting mechanism.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="unified-notification-pipeline"&gt;Unified Notification Pipeline&lt;/h3&gt;
&lt;p&gt;Whether it is a Komodo stack alert, a Proxmox metric threshold, or a general system event, all infrastructure notifications are ultimately routed to &lt;strong&gt;Discord&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I utilize a custom domain managed by Mailgun to centralize legacy alerts. Applications that strictly require standard SMTP endpoints, such as Nextcloud, Authentik, Vaultwarden password resets, or Ansible playbook outputs, route their emails into &lt;strong&gt;Mailrise&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Mailrise acts as an SMTP gateway, translating these emails and forwarding them to &lt;strong&gt;Apprise&lt;/strong&gt;, which then instantly pushes the formatted alerts to dedicated Discord webhook channels, operating alongside native webhooks sent from tools such as Komodo.&lt;/p&gt;
&lt;div class="mermaid"&gt;graph LR;
Apps[Nextcloud / Vaultwarden / Ansible] --&gt;|SMTP| Mailrise[Mailrise Gateway];
Mailrise --&gt;|API| Apprise[Apprise Middleware];
Apprise --&gt;|Webhook| Discord[Discord Alert Channels];
Komodo[Komodo / Native Alerts] --&gt;|Webhook| Discord;
Apprise --&gt;|Optional| Push[Mobile Push Notifications];
&lt;/div&gt;
&lt;hr&gt;
&lt;h2 id="-smart-power-automation--backup-strategy"&gt;⚡ Smart Power Automation &amp;amp; Backup Strategy&lt;/h2&gt;
&lt;p&gt;To optimize hardware longevity and power draw without sacrificing data integrity, the Proxmox Backup Server (PBS) is fully automated to wake up only when scheduled tasks such as backups, verification, or garbage collection are required, and power down safely afterward.&lt;/p&gt;
&lt;p&gt;Because PBS handles different tasks at different times, I engineered a unified watcher service to prevent race conditions or unexpected shutdowns during manual administration.&lt;/p&gt;
&lt;h3 id="automatic-backup-workflow"&gt;Automatic Backup Workflow&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;PVE Systemd Timers:&lt;/strong&gt; The Proxmox host utilizes systemd timers to trigger a startup script at the exact intervals required for backups or maintenance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ephemeral Flagging:&lt;/strong&gt; Once the PBS guest agent reports readiness, the host script injects an ephemeral flag file (&lt;code&gt;/run/should-autoshutdown&lt;/code&gt;) directly into the PBS VM&amp;rsquo;s volatile memory.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PBS Watcher Service:&lt;/strong&gt; A continuous watcher script inside PBS polls the task list every few minutes. It checks for active sync, backup, or GC tasks. Once all tasks complete &lt;strong&gt;and&lt;/strong&gt; the ephemeral flag file is present, it removes the flag and gracefully powers off the VM.&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote class="border-l-4 border-neutral-300 dark:border-neutral-600 pl-4 italic text-neutral-600 dark:text-neutral-400 my-6"&gt;
&lt;p&gt;&lt;strong&gt;Safety Guarantee:&lt;/strong&gt; Manual backups or maintenance starts do not generate the flag file. This ensures the server remains online while an administrator is actively working or restoring data.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 id="-repository"&gt;📁 Repository&lt;/h2&gt;
&lt;p&gt;The complete Infrastructure-as-Code implementation, including Terraform, Ansible, automation scripts, service configurations, and supporting infrastructure definitions, is available in the public repository:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;
&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>