Skip to content

Security Hardening

Defence in Depth

GoozLab uses multiple overlapping security layers. No single layer is relied upon alone.

┌──────────────────────────────────────────┐
│ Layer 1: Network Segmentation (VLANs)    │
│  ┌────────────────────────────────────┐  │
│  │ Layer 2: OPNsense Firewall Rules   │  │
│  │  ┌──────────────────────────────┐  │  │
│  │  │ Layer 3: Suricata IDS/IPS    │  │  │
│  │  │  ┌────────────────────────┐  │  │  │
│  │  │  │ Layer 4: CrowdSec      │  │  │  │
│  │  │  │  ┌──────────────────┐  │  │  │  │
│  │  │  │  │ Layer 5: DNS     │  │  │  │  │
│  │  │  │  │ Filtering        │  │  │  │  │
│  │  │  │  └──────────────────┘  │  │  │  │
│  │  │  └────────────────────────┘  │  │  │
│  │  └──────────────────────────────┘  │  │
│  └────────────────────────────────────┘  │
└──────────────────────────────────────────┘

Suricata IPS

OPNsense's built-in Suricata provides network intrusion detection and prevention.

Configuration:

  • Mode: IPS in Divert mode — the firewall hands matching traffic to Suricata with divert-to rules, instead of Suricata sitting inside the NIC driver (netmap). See the lesson for why it moved.
  • Two-tier policy:
    • Drop threats — 25 high-confidence rulesets (malware, exploits, known-bad infrastructure) are blocked
    • Alert only — 20 informational rulesets (INFO, POLICY, HUNTING and similar) are logged, never dropped
  • Rulesets: ET Open, Abuse.ch, and OPNsense-curated rules
  • Interface: LAN side, so it sees traffic between VLANs and out to the internet
  • Pattern matcher: Hyperscan (fastest option for x86)
  • Visibility: Suricata logs go to Loki via OPNsense remote syslog; Grafana alerts if Suricata goes silent or its queue falls behind

Why the LAN side, not WAN? WAN alerts are mostly noise from internet scanners hitting your public IP. The meaningful monitoring happens on the LAN side, where you can spot a compromised internal device trying to move laterally or call home.

Never Drop informational rules. Putting INFO/POLICY/HUNTING categories in Drop broke Discord, Steam and licence checks for desktop software. Those categories describe normal traffic that happens to be interesting — alert on them, don't block them.

Known false positives worth checking in your own lab:

  • SID 2006380 (plain-HTTP Basic Auth) — blocks internal services that use Basic Auth over HTTP
  • SID 2024511 ("ET DOS SMBLoris") — fires on large internal SMB writes

CrowdSec

CrowdSec is a collaborative threat intelligence tool. It analyses OPNsense logs, detects attack patterns, and shares threat data with the CrowdSec community. In return, you get blocklists of known-bad IPs from other CrowdSec users.

Installation: Available as an OPNsense plugin. After installation:

  1. Register at app.crowdsec.net for community blocklists
  2. Configure the OPNsense bouncer to automatically block flagged IPs at the firewall
  3. Review decisions in the CrowdSec dashboard

DNS Security

  • DNS-over-TLS: All upstream queries encrypted via Quad9
  • DNSSEC: Validates DNS responses — prevents poisoning and spoofing
  • Blocklists: AdGuard, Hagezi, OISD, and Steven Black lists block known ad/tracking/malware domains
  • DNS redirect: NAT rule forces all port 53 traffic to Unbound, preventing devices from bypassing local DNS

Access Security

  • No public-facing services: the only inbound WAN rule is the WireGuard UDP port
  • WireGuard VPN: the only way into the network remotely
  • Caddy access list: every internal HTTPS name answers only to the Trusted, Management and WireGuard networks — everything else gets a 403
  • SSH key-only: password authentication is off on the firewall and all three Proxmox nodes; the firewall's SSH only listens on Management, Trusted and WireGuard
  • OPNsense 2FA: the WebGUI uses TOTP + password; the seed is kept in a password manager, and SSH with a key is the break-glass path if the authenticator is lost
  • Encrypted config backups: the firewall pushes an encrypted copy of its config to the NAS over SFTP every night, using a dedicated key-only account
  • Out-of-band KVM: the JetKVM has no internet egress (blocked at the firewall) and Developer Mode off
  • Recovery path: the untagged LAN is locked down to DNS, NTP and UniFi inform/STUN to the controller, so a factory-reset UniFi device can still find its way home — and nothing else

VLAN Isolation

The most impactful security measure. See VLAN Segmentation for the full traffic matrix. Key isolation rules:

  • IoT devices cannot reach any internal network (RFC1918 block rule), and their DNS and NTP are forced to the firewall
  • Local-only IoT (smart plugs, light strip, 3D printer) has no internet at all
  • Guest WiFi gets internet only — no LAN access at all
  • Management VLAN is only reachable from Trusted and WireGuard VLANs

Host Security

  • Wazuh agents on the firewall, every Proxmox node, the monitoring host, Frigate and the main workstation, with active response that blocks attackers at the firewall — see Wazuh
  • Automatic security updates on every Linux box, including the Proxmox hosts (security repo only, no auto-reboot) — see Updates
  • Vendor clouds off: Reolink cloud/P2P, camera auto-firmware and UniFi console analytics are disabled; the 3D printer runs in LAN-only mode