The Lab

What the lab runs on

The lab is a private network operated like a small production environment: segmented, monitored, patched and backed up. These are the tools it is built on. Select a tool for a summary of how the lab uses it and for the writeups that cover it.

Detection

3

Detection

Falco

Runtime threat detection on the lab's servers, with rules tuned to cut noise.

Detection

Grafana Loki

Central log store. Log-based detection rules run here and alert on matches.

Detection

Trivy

Weekly scans of container images and configuration for vulnerabilities, misconfigurations and secrets.

Observability

4

Observability

Alertmanager

Routes alerts to Discord. A dead-man switch reports when alerting itself is down.

Observability

Grafana

Dashboards across metrics and logs.

Observability

Prometheus

Metrics and alert rules for hosts and services.

Observability

Uptime Kuma

Availability checks for each service.

Networking

4

Networking

Caddy

Reverse proxy with automatic TLS in front of the internal web applications.

Networking

OPNsense

Firewall and router. Segments the network into VLANs and enforces DNS policy.

Networking

Pi-hole

DNS filtering for the home and lab networks.

Networking

Tailscale

Private remote access to internal services, with least-privilege ACLs.

Identity

1

Identity

authentik

Single sign-on and access control for internal applications.

Platform

2

Platform

Proxmox VE

The virtualization cluster everything else runs on.

Automation

4

Automation

Ansible

Installs and configures detection agents and applies patches across hosts.

Automation

Forgejo

Self-hosted Git and CI. Changes are tested automatically before they are deployed.

Automation

Renovate

Tracks new versions of container images and proposes the updates.

Automation

Terraform

Infrastructure as code, including the AWS setup that serves this site.

Detection

Falco

Runtime threat detection on the lab's servers, with rules tuned to cut noise.

Falco watches the system calls on the lab's servers and their containers, and raises an event when a process does something suspicious, such as a web application starting a shell. Events go to Loki for history and to Alertmanager for alerts. Exceptions for known automation are kept narrow and tested, and a harmless test event from each server proves that the path still works.

Detection

Grafana Loki

Central log store. Log-based detection rules run here and alert on matches.

Every server, the firewall, the DNS filter and Falco send their logs to Loki, so one query can follow an event across machines. Detection rules run on those logs once a minute, and a match becomes a notification. Logs are kept for 31 days.

Detection

Trivy

Weekly scans of container images and configuration for vulnerabilities, misconfigurations and secrets.

Trivy scans the lab's configuration repositories and the container images they deploy, once a week, for known vulnerabilities, misconfigurations and stored secrets. Only findings that are new since the last scan raise an alert, so the same list is not repeated every week. A secret found in a repository alerts at once.

Observability

Alertmanager

Routes alerts to Discord. A dead-man switch reports when alerting itself is down.

Alertmanager receives the alerts from Prometheus, Loki and Falco, groups them, and posts them to Discord channels chosen by type and severity. A dead-man switch covers the alerting path itself: an alert that always fires pings an outside service, and when the pings stop, that service sends a notification over a separate channel.

Observability

Grafana

Dashboards across metrics and logs.

Grafana shows the metrics from Prometheus and the logs from Loki side by side. Its dashboards and data sources are loaded from files in a repository, so a rebuilt instance comes back with the same views. Sign-in goes through authentik.

Observability

Prometheus

Metrics and alert rules for hosts and services.

Prometheus collects metrics from every host and from the services that publish them. Its alert rules cover host capacity, stale backups, failed patch runs and the health of the detection pipeline. Jobs that run on a schedule, such as the weekly vulnerability scan, hand in their results through a Pushgateway.

Observability

Uptime Kuma

Availability checks for each service.

Uptime Kuma checks whether each host and each web application still answers, and sends a notification when one stops. It complements Prometheus: Prometheus shows how a service is doing, Uptime Kuma shows whether it can be reached at all. Its own page sits behind authentik sign-in.

Networking

Caddy

Reverse proxy with automatic TLS in front of the internal web applications.

Caddy is the single entry point for the internal web applications. It obtains and renews their TLS certificates through DNS validation, so no application has to answer from the internet to get one. Each site accepts requests only from the home and remote-access networks, and an application without a login of its own is placed behind authentik.

Networking

OPNsense

Firewall and router. Segments the network into VLANs and enforces DNS policy.

OPNsense is the firewall and router. It splits the network into segments, so that work, guest and IoT devices reach the internet but not the servers. It sends their DNS lookups to Pi-hole whatever resolver they ask for, blocks known DNS-over-HTTPS providers, and ships its log to Loki, where rules alert on blocked attempts from the IoT segment.

Networking

Pi-hole

DNS filtering for the home and lab networks.

Pi-hole answers the DNS lookups of every network segment and blocks advertising and tracking domains. For some internal applications it answers with a local address, so the same name works at home and over remote access. The lookups of IoT devices also go to Loki, where a rule alerts when a device asks for a domain outside its known list.

Networking

Tailscale

Private remote access to internal services, with least-privilege ACLs.

Tailscale connects the owner's devices and the servers over an encrypted private network, which is how internal applications are reached from outside the home. Servers get least privilege: an access policy allows each one only the few connections it needs, and tests written into the policy fail when a change would allow more.

Identity

authentik

Single sign-on and access control for internal applications.

authentik is the identity provider. Applications that support single sign-on, such as Grafana and Forgejo, hand their login to it through OpenID Connect (OIDC). Applications without that support sit behind an authentik proxy that asks for the same login first. One account covers all of them, and access is removed in one place.

Platform

Proxmox Backup Server

Deduplicated, scheduled backups of the virtual machines.

Proxmox Backup Server takes scheduled snapshots of the virtual machines: daily for the ones that hold data, weekly for the rest. Backups are deduplicated, so a new one stores only the blocks that changed. A separate check alerts when a machine's newest backup is too old, or when a machine is in no backup job at all.

Platform

Proxmox VE

The virtualization cluster everything else runs on.

Proxmox VE is the hypervisor. Each group of services runs in its own virtual machine on a small cluster, so a fault or a compromise in one stays out of the others. A machine can be snapshotted before a risky change and moved to another node for maintenance.

Automation

Ansible

Installs and configures detection agents and applies patches across hosts.

Ansible keeps the servers consistent from one control machine. It installs and configures the detection agents (Falco and the log shipper), applies SSH hardening, and runs the weekly package upgrade across the hosts. Each upgrade run reports its result as a metric, so a failed or missed run raises an alert.

Automation

Forgejo

Self-hosted Git and CI. Changes are tested automatically before they are deployed.

Forgejo hosts the lab's Git repositories: every service's configuration is kept there, and the servers pull from it. Its built-in CI tests a change before it is applied. For a few services a successful run also deploys the new version, and rolls back or halts when the health check fails. It is also the registry for the container images the lab builds itself.

Automation

Renovate

Tracks new versions of container images and proposes the updates.

Renovate checks every day whether a newer version exists for each container image and dependency the lab pins, and proposes the update in the repository that uses it. Applying an update stays a deliberate step. A separate report compares what Renovate tracks with what is running, and alerts when an image runs that nothing watches for updates.

Automation

Terraform

Infrastructure as code, including the AWS setup that serves this site.

Terraform describes infrastructure as code, so it can be reviewed and rebuilt. The largest example is this site: its storage bucket, CloudFront distribution, TLS certificate and short-lived deploy role are defined in Terraform, in the site's public repository. In the lab, a Terraform provider can create virtual machines on Proxmox.