hubble: bare-IP listener (8082) for the UI + WireGuard-only firewall on both gateway nodes
Operator addendum: internal services must be reachable by bare IP+port, because a phone cannot edit /etc/hosts. A hostname-scoped route does not match `Host: 10.10.0.2:8081` (Envoy 404), and a hostname-less `PathPrefix /` cannot share a listener with it — so hubble-ui gets its own listener (`hubble-ui`, port 8082) with a route that sets no hostnames. http://10.10.0.2:8082/ and http://hubble.lab.internal:8082/ both hit the UI. Firewall: siriussec nft table now matches `dport { 8081, 8082 }` and starts with `destroy table` so re-running the unit replaces (not appends) the rules; the rpi ufw script is generalised to a PORTS list and inserts each port above the LAN catch-all. Both hosts applied and verified before the listener was programmed. docs: internal gateway section, host-firewall README.
This commit is contained in:
parent
41161d82a1
commit
7ca85669b2
8 changed files with 83 additions and 43 deletions
|
|
@ -10,10 +10,12 @@ are *both* listening on the LAN interfaces; the Gateway API object cannot say
|
|||
| 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` |
|
||||
| rpi (10.10.0.1) | ufw rules inserted above the `allow from 192.168.1.0/24` catch-all | `rpi-ufw-internal-gw.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).
|
||||
Effective policy for `:8081` (Grafana) and `:8082` (Hubble UI) 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). Envoy binds every listener on `0.0.0.0`, so a
|
||||
new internal listener port is a LAN exposure until it is added here.
|
||||
|
||||
These are host units, not Flux objects — a node reinstall has to re-apply them.
|
||||
Install:
|
||||
|
|
@ -25,7 +27,7 @@ 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
|
||||
bash rpi-ufw-internal-gw.sh
|
||||
```
|
||||
|
||||
Verify:
|
||||
|
|
@ -34,7 +36,7 @@ Verify:
|
|||
# siriussec
|
||||
nft list table inet internal_gw
|
||||
# rpi
|
||||
ufw status | grep 8081
|
||||
ufw status | grep -E '8081|8082'
|
||||
```
|
||||
|
||||
Negative test from the LAN must be a timeout (DROP), never 200:
|
||||
|
|
@ -44,6 +46,8 @@ curl -m 3 -sS -o /dev/null -w '%{http_code}\n' http://192.168.1.179:8081/ # em
|
|||
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.
|
||||
When a new internal listener port is added, add it to the `tcp dport { … }` set
|
||||
in `siriussec-internal-gw.nft` and to `PORTS` in `rpi-ufw-internal-gw.sh` (which
|
||||
inserts one deny for the port plus mesh and pod-CIDR allows above the LAN
|
||||
catch-all), then reinstall both and re-run the two negative tests above with the
|
||||
new port.
|
||||
|
|
|
|||
Loading…
Reference in a new issue