feat(traefik): web upstream over the tailnet, public address as fallback (#243) #244
Loading…
Reference in a new issue
No description provided.
Delete branch "jfraeys/feat/webapps-upstream-over-tailnet"
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?
Closes #243.
Today Traefik (and Anubis, if enabled) forward demo.jfraeys.com and app.jfraeys.com to http://:80. Verified: the route to that address leaves via eth0, and web's nginx log shows the services node's public address (172.105.107.95) as the source for those requests, i.e. unencrypted over public addresses, and the upstream is a raw IP from the generated inventory.
Change
Why the Online filter: on the real services node 'tailscale status --json' lists two peers named web, a stale offline one (100.64.0.21) and the live one (100.64.0.1).
Checked: scripts/tests/test-web-apps-upstream.sh (7 cases with a fake tailscale; two cases fail if the Online filter is removed; in lint.yml); ansible-lint on the touched playbooks and roles passes; the ACL template renders to valid JSON and contains the new rule; the status JSON fields (HostName, Online, TailscaleIPs) confirmed on the live node.
Not checked: a real deploy. Web's ufw already allows tailscale0 and nginx listens on 0.0.0.0:80; nginx has no allow/deny or real_ip rule that would reject a 100.64.x source (grep found none).
Deploy order matters: ./infra deploy --tags headscale --limit services FIRST (ACL; recreates the Headscale container, brief control-plane blip), confirm, THEN --tags traefik. Traefik before the ACL would make demo/app time out. Baseline before the change: see the PR comment. After: nginx access log on web shows source 100.64.0.3 for demo requests; demo and app answer as before.
roles/, playbooks/ and inventory/ are staged paths: staging, promotion.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ge5tovcwdEUBtPwUktsZZZ