-
A visitor
Anyone opening one of my sites.
-
Cloudflare
Proxy in front of the domains: hides my home IP and filters. It also runs the DNS where Traefik proves the domain is mine.
-
MikroTik router
Forwards the HTTPS coming in on the WAN, and only that, to the Traefik container.
-
Let's Encrypt
The authority that signs the certificates, free and renewable every 90 days.
-
Infrastructure repository
The list of published services lives here, versioned: which domain goes to which service.
-
Ansible
Reads the list and writes one route per domain, creates its DNS record in Cloudflare and deletes routes and records that are no longer there. The same list generates the homelab's start page.
-
HTTPS entry point
Traefik listens for HTTPS. Plain HTTP only exists to redirect to HTTPS.
-
TLS termination
Traefik presents each domain's valid certificate and decrypts the request.
-
Visitor's real IP
Behind Cloudflare, every request seems to come from Cloudflare. Traefik only trusts the real-IP header if it comes from Cloudflare's ranges.
-
Renewal through DNS
To prove the domain is mine, Traefik creates a temporary record in Cloudflare's DNS. No extra port to open, and it works for wildcards.
-
Routes
One route per domain, in its own file. Traefik looks at the requested name and picks the service.
-
Redirects
Variants with or without «www» send you to the canonical address with a 301, declared in the service list itself.
-
Traefik dashboard
No insecure access, no public name and limited to the home network and the VPN.
- Traefik
- Linux / SSH hardening
-
This site
One of the services behind the door. It has its own unit.
-
Media
Plex and what surrounds it, to watch away from home.
-
Messaging (Matrix)
The chat server and its web client.
-
Game websites
The public site of the game servers. The game itself doesn't come through here: Traefik only speaks HTTP.
-
Access log
One line per request: who, what and the result. Rotated daily, 14 kept, compressed. It's what CrowdSec reads.
- Linux (Debian, Alpine, Arch)
-
CrowdSec
Reads the access log and recognises scans, hunts for sensitive files, known exploits and brute force. It shares what it sees with its community network and gets its list of malicious IPs back.
- CrowdSec
- Linux / SSH hardening
-
systemd service
The official binary with its systemd unit, no Docker: fewer parts at the most exposed door.
- Linux (Debian, Alpine, Arch)
- Linux / SSH hardening
-
Monitoring
Monitoring checks it answers and Hermes' certificate watcher warns before any of them expires.