Commit Graph

613 Commits

Author SHA1 Message Date
Will Anderson 5a50e2bb63 Fix NAT-PMP struct format and renewal interval
ProtonVPN returns 16-byte success responses (last field is uint32 lifetime,
not uint16). The previous !BBHIHHH format expected 14 bytes causing unpack
failure. Fixed to !BBHIHHI (16 bytes).

ProtonVPN grants 60s leases; request 60s and renew every 45s instead of
sleeping 240s which let leases expire between renewals.
2026-04-15 17:34:00 -05:00
Will Anderson 8a43279164 Switch fornax workers to custom WireGuard provider with correct server keys
The protonvpn provider mode uses gluetun's embedded server database which
doesn't contain US-TX#253 or US-TX#34. Our WireGuard keys are registered
for specific ProtonVPN servers, so connecting to other servers (US-TX#179,
US-TX#220) results in successful WireGuard handshake but ProtonVPN drops all
internet-bound traffic.

Fix: use VPN_SERVICE_PROVIDER=custom to directly configure the correct server
peer public key and endpoint IP for each worker. ExternalSecrets updated to
also pull public_key and endpoint_ip from Vault.

- tx253: endpoint=95.173.217.29, peer=mngiSxBpH7GU24nnWdBEcnhDnCPn2jq5+ZP3zwPwISA=
- tx34: endpoint=146.70.58.130, peer=wqJcz4akzVFxx35aJ5B7G/IJ9qsRvpcGNub3rLHcqXo=
2026-04-15 03:21:26 -05:00
Will Anderson 8a111a13b9 Add UPDATER_PERIOD to download fresh ProtonVPN server list
Will refresh gluetun's embedded server list from ProtonVPN API.
Need to extract public key for US-TX#253 (95.173.217.29) which
is not in gluetun's embedded database but should be in the live list.
2026-04-15 03:08:06 -05:00
Will Anderson 02dfeab975 Test free tier server to diagnose internet routing 2026-04-15 03:02:33 -05:00
Will Anderson d5f8955eb8 Test CA server with PF off to diagnose internet routing 2026-04-15 03:00:55 -05:00
Will Anderson 8d41fbfffc Test US-CA#20 for tx253 to diagnose internet routing failure 2026-04-15 02:59:34 -05:00
Will Anderson 91d0f4a130 Revert to valid gluetun server names (US-TX#179, US-TX#220)
US-TX#253 and US-TX#34 not in gluetun embedded server list — gluetun
crashes on startup. Reverted to valid names while investigating correct
server mapping. Need to find server public keys for Vault endpoint IPs.
2026-04-15 02:54:26 -05:00
Will Anderson 4f558ed576 Fix ProtonVPN server names to match registered WireGuard keys
Keys in Vault are registered for US-TX#253 (tx253 worker) and US-TX#34
(tx34 worker), but deployment was connecting to US-TX#179 and US-TX#220.
WireGuard handshake succeeded globally but ProtonVPN only routes internet
traffic through the server the key was registered with.
2026-04-15 02:48:47 -05:00
Will Anderson ff74ce644b Test: re-enable VPN_PORT_FORWARDING to check startup check behavior
With VPN_PORT_FORWARDING=off, gluetun startup check fails with TLS EOF
for generic IP-check services. Previous session showed startup check
PASSED with VPN_PORT_FORWARDING=on (only port-forwarding API failed).
Testing to confirm VPN routing works when startup check uses ProtonVPN
API instead of generic HTTPS services.
2026-04-15 02:40:56 -05:00
Will Anderson 8d6dd27435 Fix gluetun MTU for k3s Flannel network
eth0 MTU in pods is 1450 (Flannel VXLAN). gluetun's MTU discovery
was setting tun0 to 1440, making WireGuard outer packets ~1500 bytes
which exceeds the 1450 limit. TLS ClientHello gets dropped, causing
startup check to fail and loop. Fix: set MTU=1320 so WireGuard UDP
packets stay well under 1450.
2026-04-15 02:32:51 -05:00
Will Anderson de94ca216a Fix tx34 portforward-helper NATPMP: use single-line Python
Multiline NATPMP variable in tx34 had column-0 lines that broke
Go's YAML parser (same bug that was fixed in tx253). Replace with
identical single-line python3 -c approach.
2026-04-15 02:28:39 -05:00
Will Anderson c88f7022c6 Fix YAML: replace heredoc with inline Python for NAT-PMP portforward-helper 2026-04-15 02:24:40 -05:00
Will Anderson 6fc0fb2563 Disable gluetun port forwarding, use NAT-PMP directly in portforward-helper 2026-04-15 02:19:39 -05:00
Will Anderson c2a936f790 Fix gluetun routing deadlock: aggressively remove rule 100 from startup 2026-04-15 02:03:32 -05:00
Will Anderson 7e5ba1a288 Fix ProtonVPN server names: US-TX#179 and US-TX#220 (not #253/#34) 2026-04-15 01:53:56 -05:00
Will Anderson 942b398a53 Switch workers back to protonvpn provider — custom WireGuard IP assignment mismatch
Custom provider hardcodes 10.2.0.2/32 but ProtonVPN assigns a different
IP per session via their API. WireGuard handshake succeeds but ProtonVPN
doesn't route traffic for the wrong IP. Native protonvpn provider fetches
the correct IP assignment automatically and enables port forwarding.
2026-04-15 01:51:17 -05:00
Will Anderson 0b3f2d38a8 Remove standalone qbittorrent — superseded by fornax workers 2026-04-15 01:41:42 -05:00
Will Anderson 59353c68dc Scale down standalone qbittorrent — replaced by fornax workers 2026-04-15 01:40:43 -05:00
Will Anderson e12fd9781a Fix VPN routing: give portforward-helper NET_ADMIN to delete gluetun rule 100
gluetun adds 'ip rule priority 100 from <pod-IP> lookup 200' which routes
all pod traffic via eth0. The iptables OUTPUT DROP policy then blocks it.
Rule 101 (not fwmark 0xca6c -> tun0) never fires because rule 100 matches
first. Result: qBittorrent has no internet access through the VPN.

Fix: portforward-helper waits for gluetun to be ready (polls :9999), then
deletes rule 100. Application traffic then falls through to rule 101 and
routes correctly via tun0.
2026-04-15 01:40:02 -05:00
Will Anderson 87367d4387 Add Gitea SSH tunnel via ssh.git.neuralplatform.ai 2026-04-14 23:53:18 -05:00
Will Anderson ad2a1db3e2 Remove conflicting fornax-worker Argo CD apps — media app is sole owner
The fornax-worker-tx253 and fornax-worker-tx34 Argo CD apps were fighting
the media app (which also manages the same Deployments, Services, PVCs,
and ExternalSecrets via fornax-workers.yaml). This caused 73+ rolling
restarts per 2 hours. Since neither app had a cascade-delete finalizer,
removing these Application CRDs leaves existing resources intact and
transfers ownership to the media app.
2026-04-14 22:25:25 -05:00
Will Anderson ef8dc293e5 Set HEALTH_ICMP_TARGET_IPS to WireGuard gateway for periodic health check
ProtonVPN does not NAT ICMP to external IPs (1.1.1.1, 8.8.8.8), causing
the periodic small health check to always fail and restart the VPN loop.
10.2.0.1 (WireGuard gateway) responds to ICMP at ~28ms and remains
reachable as long as the WireGuard tunnel itself is up.
2026-04-14 22:08:40 -05:00
Will Anderson 214afed0a2 Set DNS_UPSTREAM_RESOLVER_TYPE=plain to actually disable DoT in gluetun
DOT=off alone does not override DNS_UPSTREAM_RESOLVER_TYPE in this version
of gluetun — it defaults to DoT regardless, causing DNS failures through
ProtonVPN (port 853 connection reset). Setting the resolver type directly
fixes plain DNS routing to k8s CoreDNS.
2026-04-14 22:04:36 -05:00
Will Anderson 41ab2eaf0e Fix DNS_UPSTREAM_PLAIN_ADDRESSES format: requires ip:port not bare ip 2026-04-14 22:01:50 -05:00
Will Anderson 10dd561ec0 Fix gluetun healthcheck targets and DNS env var on fornax workers
Change HEALTH_TARGET_ADDRESS to ProtonVPN API endpoints so TLS startup
check doesn't fail against cloudflare.com/github.com (rejected from
ProtonVPN exit IPs). Rename deprecated DNS_ADDRESS to
DNS_UPSTREAM_PLAIN_ADDRESSES in fornax-workers.yaml.
2026-04-14 21:58:52 -05:00
Will Anderson a1623eda39 Fix gluetun DNS: disable DoT, use k8s coredns as plaintext resolver
DoT (port 853) to 1.1.1.1 through ProtonVPN VPN tunnel gets TCP RST,
causing gluetun healthcheck to fail (can't resolve github.com /
cloudflare.com). k8s coredns at 10.43.0.10 is reachable via eth0
within FIREWALL_OUTBOUND_SUBNETS, bypassing the VPN for DNS while
letting all other traffic tunnel correctly.

Also rename VPN_ENDPOINT_IP/PORT to WIREGUARD_ENDPOINT_IP/PORT to
suppress gluetun deprecation warnings.
2026-04-14 21:32:57 -05:00
Will Anderson 741191a7e6 Switch workers to custom WireGuard provider with correct endpoint IPs
gluetun's bundled protonvpn server list has stale IPs for US-TX#179
(37.19.200.26) and US-TX#220 (95.173.217.2). The WIREGUARD_ENDPOINT_IP
env var is a filter not an override, so there's no way to redirect
protonvpn provider to a new IP.

Switch to custom WireGuard provider with hardcoded endpoint IPs from
fresh ProtonVPN configs (95.173.217.29 / 146.70.58.130). Add
DNS_KEEP_NAMESERVER=on so gluetun leaves k8s DNS intact instead of
routing DNS through its own proxy (which breaks in-cluster).

Port forwarding is not available with custom provider; will restore
once gluetun releases an updated server list image.
2026-04-14 21:29:29 -05:00
Will Anderson 0688700ebc Fix gluetun endpoint env var: use WIREGUARD_ENDPOINT_IP, drop port
gluetun rejects VPN_ENDPOINT_PORT when SERVER_NAMES is used (server
selection mode), and warns that VPN_ENDPOINT_IP is deprecated in
favour of WIREGUARD_ENDPOINT_IP. Use only WIREGUARD_ENDPOINT_IP;
port 51820 is ProtonVPN's default and doesn't need to be set.
2026-04-14 21:25:55 -05:00
Will Anderson 87934e9284 Override stale gluetun endpoint IPs for ProtonVPN servers
ProtonVPN migrated US-TX#179 (37.19.200.26 → 95.173.217.29) and
US-TX#220 (95.173.217.2 → 146.70.58.130). gluetun's bundled server
list still has the old dead IPs. Override via VPN_ENDPOINT_IP and
VPN_ENDPOINT_PORT so gluetun uses the correct endpoints while keeping
the protonvpn provider (and port forwarding) intact.
2026-04-14 21:24:19 -05:00
Will Anderson 008df2b584 Fix server names: US-TX#179 for tx253, US-TX#220 for tx34 (gluetun protonvpn format) 2026-04-14 21:19:02 -05:00
Will Anderson a2239ab89e Switch back to protonvpn provider with US-TX#253 and US-TX#34 2026-04-14 21:17:20 -05:00
Will Anderson 88c4d795e7 Switch DNS to 8.8.8.8 — ProtonVPN internal DNS returning errors 2026-04-14 21:12:33 -05:00
Will Anderson 027667e7f7 Remove custom health target — use ProtonVPN internal DNS for resolution 2026-04-14 21:10:42 -05:00
Will Anderson e6d1350ca8 Use ProtonVPN internal DNS and direct IP healthcheck to diagnose VPN 2026-04-14 21:08:55 -05:00
Will Anderson 0c238e9e7e Update worker VPN endpoints: tx253→US-TX#253, tx34→US-TX#34 2026-04-14 21:04:37 -05:00
Will Anderson 9778f79845 Configure per-worker VPN endpoints: tx253→US-TX#253, tx34→US-TX#34 2026-04-14 21:02:01 -05:00
Will Anderson fcff5f62e5 Switch worker base to custom WireGuard provider for US-IL#267 2026-04-14 20:31:03 -05:00
Will Anderson 7893fdc1d3 Remove VPN_PORT_FORWARDING from tx34 — not supported with custom provider 2026-04-14 20:27:16 -05:00
Will Anderson 59f551663b Switch gluetun to custom provider — use explicit WireGuard config for US-IL#267
Avoids gluetun's ProtonVPN server name lookup entirely. All WireGuard
parameters (endpoint, peer key, client address, keepalive) come directly
from the downloaded ProtonVPN config.
2026-04-14 20:22:31 -05:00
Will Anderson 9a523da831 Use SERVER_COUNTRIES=US with explicit endpoint — gluetun has no US-IL naming 2026-04-14 20:20:47 -05:00
Will Anderson c283110e70 Switch workers to US-IL#267 with explicit WireGuard endpoint and peer key
US-TX#179 and US-TX#220 were failing — WireGuard handshake completing
but no traffic passing (silent drop). Switching both workers to US-IL#267
and pinning the endpoint IP and peer public key directly to avoid relying
on gluetun's built-in server list lookup.
2026-04-14 20:18:57 -05:00
Will Anderson 7f7e2e26da Force coordinator rollout to pick up new image with downloadSpeedBps 2026-04-14 20:10:08 -05:00
Will Anderson b5f481d9a4 Fix qbt-config-patch for Python 3.14: use lambda in re.sub replacements
Python 3.14 raises PatternError for backslash sequences like \P in
re.sub replacement strings. Switch to lambda replacements which bypass
that interpretation. Also pin to python:3.13-alpine to avoid future
surprises from pulling :3-alpine.
2026-04-14 20:00:24 -05:00
Will Anderson 07f75c7dc8 Force UI pod rollout to pick up new nginx image 2026-04-14 19:57:32 -05:00
Will Anderson 87c4b63cca Route /api/ui through nginx to bypass Cloudflare Access; bump restartedAt
The /api/ui path is now routed to the fornax-ui nginx pod (which proxies
internally to the coordinator) rather than directly to the coordinator.
This fixes the browser fetch being blocked by Cloudflare Access.

Both coordinator and UI deployments get a restartedAt bump to pull the
new images after CI builds.
2026-04-14 19:44:23 -05:00
Will Anderson 3110903c81 Force rollout to pick up new images with real qBT wiring 2026-04-14 19:30:23 -05:00
Will Anderson a1615df3e9 Fix overseerr.yaml YAML indentation error blocking media app sync 2026-04-14 19:18:13 -05:00
Will Anderson 2a21c9d57e Fix fornax service port and add qBittorrent worker env vars
- fornax service: targetPort 8080→3000 (Express listens on 3000, not 8080)
  This was silently dropping all Radarr/Sonarr requests
- coordinator deployment: add QBT_WORKER_ADDRS, QBT_USER, QBT_PASS
  so /api/ui/state can query real worker qBittorrent instances
- remove Python coordinator ConfigMap and Deployment (superseded)
2026-04-14 19:17:00 -05:00
Will Anderson 788f103c0e Force UI rollout to pick up new image with CSS stylesheet 2026-04-14 19:02:48 -05:00
Will Anderson 7e2a7c7126 Force coordinator rollout to pick up new image with crash fix 2026-04-14 19:02:18 -05:00