fix(security): bind primary admin and monitoring ports to the tailnet address #75
Loading…
Reference in a new issue
No description provided.
Delete branch "security/primary-service-binds"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From the 2026-11-03 security audit: Prometheus (9090) and Node Exporter (9102) answer on primary's public IP with no authentication, and the Grafana (3002) and Nginx Proxy Manager admin (81) login pages are public as well. Verified still exposed on 2026-11-14.
This change binds those published ports to the tailnet address only, using the same ${PRIMARY_TAILSCALE_IP} pattern already in use for Loki (primary-tools) and Technitium (primary-networking-security):
Access after the change: the UIs stay reachable at their corebot.ca domains (the reverse proxy reaches the containers over mystic-net, not via the host ports) and directly over Tailscale. Prometheus scraping is unaffected — it targets node-exporter, cadvisor and docker-exporter by service name on the internal network.
Pocket ID note: the SSO sign-in itself stays public at sso.corebot.ca through the reverse proxy, by design — browsers have to reach it to sign in. Only the redundant direct port publish (1411 on the public IP) closes; nothing in the sign-in flow uses it, since the OIDC issuer and all app integrations use the domain.
Deliberately out of scope: Uptime Kuma 3001 (public status is intended), docker-exporter 8082 (separate decision), and Komodo Core 9120 — Core is not defined in this repo (it runs from a standalone compose file outside the stacks) and is handled separately.
Deploy after merge, one service at a time via Komodo DeployStackService: primary-tools (grafana, prometheus, node-exporter only — do not deploy the whole stack) and primary-networking-security (npm and pocket-id only; recreating npm briefly interrupts the reverse proxy). Verify after each: the port stops answering on the public IP and still answers on the tailnet address.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.