monitoring: kube-prometheus-stack + WireGuard-only Grafana via the internal gateway
- clusters/homek8s/monitoring.yaml: the 'monitoring' Flux Kustomization was declared only under clusters/home, which the bootstrapped flux-system Kustomization never reads (its path is ./clusters/homek8s), so it had never been created. Declare it in the tree that actually reconciles. - monitoring/controllers/home: HelmRepository + HelmRelease (chart pinned 92.14.0), values.yaml via configMapGenerator, Grafana admin from the monitoring/grafana-admin Secret (out of band, never in git). - Everything pinned to siriussec, Prometheus on a 10Gi local-path PVC with 7d AND 8GB retention caps; alertmanager off; no remote write. - internal gateway listener now accepts routes from any namespace; the security boundary is the host firewall, not the namespace. - host-firewall/: nft table + oneshot unit for siriussec and the ufw script for rpi that close :8081 to everything but 10.10.0.0/24 and 10.244.0.0/16.
This commit is contained in:
parent
242d76a6d3
commit
d3741df619
13 changed files with 367 additions and 2 deletions
49
infrastructure/networking/internal/host-firewall/README.md
Normal file
49
infrastructure/networking/internal/host-firewall/README.md
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# Internal Gateway host firewall
|
||||
|
||||
Cilium programs every Gateway listener on **all** nodes carrying
|
||||
`node-role.kubernetes.io/gateway=true` (`rpi` = 10.10.0.1, `siriussec` =
|
||||
10.10.0.2) and its Envoy binds `0.0.0.0:<listener port>` in the host network
|
||||
namespace. So `gateway-system/public` on 8080 and `internal/internal` on 8081
|
||||
are *both* listening on the LAN interfaces; the Gateway API object cannot say
|
||||
"WireGuard only". The host firewall is the enforcement point:
|
||||
|
||||
| Host | Mechanism | Artifact |
|
||||
|------|-----------|----------|
|
||||
| siriussec (10.10.0.2) | nftables table `inet internal_gw`, loaded by a oneshot unit (same pattern as `k8s-api-firewall.service`) | `siriussec-internal-gw.nft`, `internal-gw-firewall.service` |
|
||||
| rpi (10.10.0.1) | ufw rules inserted above the `allow from 192.168.1.0/24` catch-all | `rpi-ufw-8081.sh` |
|
||||
|
||||
Effective policy for `:8081` on both hosts: **accept from 10.10.0.0/24 and
|
||||
10.244.0.0/16, accept on lo, drop everything else** (LAN, tailscale, public).
|
||||
|
||||
These are host units, not Flux objects — a node reinstall has to re-apply them.
|
||||
Install:
|
||||
|
||||
```bash
|
||||
# siriussec, as root
|
||||
install -m 0644 siriussec-internal-gw.nft /etc/nftables.d/internal-gw.nft
|
||||
install -m 0644 internal-gw-firewall.service /etc/systemd/system/
|
||||
systemctl daemon-reload && systemctl enable --now internal-gw-firewall.service
|
||||
|
||||
# rpi, as root
|
||||
bash rpi-ufw-8081.sh
|
||||
```
|
||||
|
||||
Verify:
|
||||
|
||||
```bash
|
||||
# siriussec
|
||||
nft list table inet internal_gw
|
||||
# rpi
|
||||
ufw status | grep 8081
|
||||
```
|
||||
|
||||
Negative test from the LAN must be a timeout (DROP), never 200:
|
||||
|
||||
```bash
|
||||
curl -m 3 -sS -o /dev/null -w '%{http_code}\n' http://192.168.1.179:8081/ # empty/000
|
||||
curl -m 3 -sS -o /dev/null -w '%{http_code}\n' http://192.168.1.125:8081/ # empty/000
|
||||
```
|
||||
|
||||
When a new internal listener port is added, add the same three lines with the
|
||||
new port to both artifacts — one deny for the port, allows for the mesh and the
|
||||
pod CIDR, inserted above the LAN catch-all.
|
||||
Loading…
Reference in a new issue