monitoring: the hardening lived on the host and not in here

Prometheus and Loki accept writes without authentication and were bound to
0.0.0.0; node-exporter likewise. That was fixed on CFGMON during the firewall
work today and never came back to the repository, so this file still described
three open ports and a firewall as the only thing in front of them.

The consequence is worse than a stale comment. A pull would have reverted the
binding and reopened all three, and nothing here or there would have said so.
It did not happen only because git refused the pull over the local edit — the
accident that saved it is not a control.

Ports now match what actually runs: the private vSwitch address for the hosts
that push, localhost for the host itself, and node-exporter on localhost alone.
This commit is contained in:
Thore Cimbal
2026-08-21 12:00:00 +00:00
parent 422b651f43
commit 1ce4b55b75
2 changed files with 28 additions and 10 deletions
+12 -3
View File
@@ -214,9 +214,18 @@ selbst nicht melden koennen.
## Offene Punkte / Sicherheit
- `9090`, `3100`, `9100` sind auf der oeffentlichen IP ohne Auth erreichbar
(Docker umgeht ufw). Per **Hetzner Cloud Firewall** auf die IPs der
bekannten Absender einschraenken.
- `9090`, `3100`, `9100`: **erledigt am 2026-08-21.** Sie standen auf `0.0.0.0`
und waren damit auf der oeffentlichen IP ohne Auth erreichbar (Docker umgeht
ufw). Jetzt an Adressen gebunden -- `10.0.0.3` fuer die pushenden Absender
ueber den vSwitch, `127.0.0.1` fuer den Host selbst; node-exporter nur
localhost. Die Hetzner-Firewall bleibt die zweite Schicht, ist aber nicht
mehr die einzige.
⚠️ **Das war auf dem Host repariert und im Repo nicht.** Vier Monate spaeter
haette ein `git pull` die Ports wieder geoeffnet, ohne dass jemand es
bemerkt haette -- verhindert nur dadurch, dass git den Pull wegen der
lokalen Aenderung abgelehnt hat. Eine Haertung, die nur auf dem Host steht,
ist keine Haertung, sondern eine Wette auf das naechste Deployment.
- Game-Host: **erledigt**. Host-Seite am 2026-08-20 deployt und verifiziert, die
Ports liegen auf `10.0.0.4` (nicht `0.0.0.0` -- das umginge ufw). Der lokale
Prometheus/Grafana/Loki-Stack des Game-Hosts ist zurueckgebaut; er liefert nur
+16 -7
View File
@@ -17,11 +17,16 @@ services:
- '--storage.tsdb.retention.time=45d'
- '--storage.tsdb.retention.size=15GB'
# Remote-Write-Receiver: k3s-Cluster und Matrix-Server pushen hierher.
# ACHTUNG: Port 9090 ist oeffentlich und ohne Auth erreichbar --
# per Hetzner Cloud Firewall auf die Absender-IPs einschraenken!
# ⚠️ Prometheus hat KEINE Authentisierung. Bis 2026-08-21 stand hier
# "9090:9090", also 0.0.0.0 - oeffentlich erreichbar, abgesichert allein
# durch die Hetzner-Firewall. Seither an Adressen gebunden: der private
# vSwitch fuer die pushenden Absender, localhost fuer den Host selbst.
# Wer das zurueckdreht, macht die Zeitreihen wieder oeffentlich lesbar
# UND beschreibbar.
- '--web.enable-remote-write-receiver'
ports:
- "9090:9090"
- "10.0.0.3:9090:9090"
- "127.0.0.1:9090:9090"
networks:
- traefik
@@ -158,10 +163,12 @@ services:
- ./loki:/etc/loki:ro
- loki_data:/loki
command: -config.file=/etc/loki/loki-config.yaml
# Port 3100 oeffentlich: externe Alloys pushen Logs hierher.
# Ebenfalls per Firewall auf bekannte Absender-IPs einschraenken.
# ⚠️ Externe Alloys pushen Logs hierher; Loki hat ebenfalls keine
# Authentisierung. Bis 2026-08-21 auf 0.0.0.0 gebunden, seither wie
# Prometheus: privater vSwitch fuer die Absender, localhost fuer den Host.
ports:
- "3100:3100"
- "10.0.0.3:3100:3100"
- "127.0.0.1:3100:3100"
networks:
- traefik
@@ -228,8 +235,10 @@ services:
- '--path.rootfs=/rootfs'
- '--web.listen-address=:9100'
- '--web.disable-exporter-metrics'
# Nur localhost: gescrapt wird aus demselben Host heraus, von aussen hat
# hier niemand etwas zu suchen. Bis 2026-08-21 stand auch das auf 0.0.0.0.
ports:
- "9100:9100"
- "127.0.0.1:9100:9100"
networks:
- traefik