homek8s/infrastructure/networking/internal/host-firewall/siriussec-internal-gw.nft
Lance Walters ae22aab330 apps(customer1): anonymize client name — farrisilk -> customer1
Rename the client-shaped lab replica namespace and its manifests to keep the
client name out of the repo going forward (git history is intentionally not
rewritten).

- apps/base/farrisilk -> apps/base/customer1 (namespace, workloads, PVCs,
  HTTPRoutes, backup CronJob, README)
- infrastructure/networking/internal/gateway-farrisilk-{odoo,metabase}.yaml ->
  gateway-customer1-{odoo,metabase}.yaml (listener ports unchanged: 8086/8087)
- firewall comment headers updated (rules/ports untouched)

No functional change beyond object names; workloads remain parked at 0.
2026-11-24 01:46:25 -05:00

35 lines
No EOL
1.6 KiB
Text

#!/usr/sbin/nft -f
# Internal (WireGuard-only) gateway listeners: TCP 8081 (Grafana), 8084
# (Hubble UI), 8085 (Metabase) and 8086/8087 (Customer 1 lab replica: Odoo,
# Metabase).
#
# Cilium's hostNetwork Envoy binds every Gateway listener on 0.0.0.0, so the
# internal listeners are open on the LAN interface the moment the Gateway is
# programmed. This table makes them answer only from the WireGuard mesh and the
# pod network. DROP (not reject) so a LAN scan sees a timeout, not a port that
# tells you something is listening.
#
# Adding an internal service: add its listener port to the set in all three
# rules below, reinstall this file, then
# `systemctl reload-or-restart internal-gw-firewall.service`. The same list
# must also be added to the rpi ufw rules (rpi-ufw-internal-gw.sh).
#
# Loaded by internal-gw-firewall.service on siriussec. `destroy` (not `delete`)
# so re-running the unit REPLACES the table instead of appending a second copy
# of the rules, and does not fail when the table does not exist yet.
destroy table inet internal_gw
table inet internal_gw {
chain input {
type filter hook input priority filter; policy accept;
# local process / kubelet probes
tcp dport { 8081, 8084, 8085, 8086, 8087 } iifname "lo" counter accept
# WireGuard mesh (Legion = 10.10.0.3, nodes, remote hub spokes)
# and the pod network (in-cluster scrapers, probes)
tcp dport { 8081, 8084, 8085, 8086, 8087 } ip saddr { 10.10.0.0/24, 10.244.0.0/16 } counter accept
# everything else: LAN, tailscale, public
tcp dport { 8081, 8084, 8085, 8086, 8087 } counter drop
}
}