Commit Graph
214 Commits
Author SHA1 Message Date
jakman85 7e41cc0282 Merge feature/vpn-custom-ovpn-ip into main 2026-08-23 01:01:20 -05:00
jakman85andClaude Opus 4.8 63f6e15d0e feat(vpn): new IP-based .ovpn secret + map its key to /config/pia.ovpn
Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-23 01:01:19 -05:00
jakman85andClaude Opus 4.8 c8b9653e33 fix(vpn): custom mode with IP-based .ovpn; gluetun v3.41.0 -> v3.41.3
Operator provides a new .ovpn with an IP remote (gluetun's custom parser rejects
hostnames), so drop the resolve-remote initContainer/VPN_ENDPOINT_IP attempts and
mount the .ovpn directly (key pia.ovpn). Bump image to latest v3.41.3.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-23 00:57:01 -05:00
jakman85 3787644c48 Merge feature/vpn-endpoint-ip into main 2026-08-23 00:50:54 -05:00
jakman85andClaude Opus 4.8 66a76e6e33 fix(vpn): VPN_ENDPOINT_IP for custom mode (.ovpn hostname not parseable)
gluetun's custom parser rejects the .ovpn's 'remote sweden.privacy.network' (needs
an IP). sweden.privacy.network LB pool = 158.173.241.{22,34,55,112,239}; pin .22
(verified to handshake) via VPN_ENDPOINT_IP/PORT while the .ovpn supplies cipher/CA.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-23 00:50:54 -05:00
jakman85 3c359e2937 Merge feature/vpn-ovpn-keyname into main 2026-08-23 00:46:31 -05:00
jakman85andClaude Opus 4.8 998b46df3d fix(vpn): map .ovpn secret key (filename) to /config/pia.ovpn
Operator's kubectl create secret keyed the file by its name
(sweden-aes-128-cbc-udp-dns.ovpn); mount item now references that key -> pia.ovpn.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-23 00:46:31 -05:00
jakman85 6c34fb636d Merge feature/vpn-custom-ovpn into main 2026-08-23 00:45:39 -05:00
jakman85andClaude Opus 4.8 47b6cb6afd feat(vpn): add operator-provisioned pia-custom-ovpn Secret (SOPS)
Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-23 00:45:39 -05:00
jakman85andClaude Opus 4.8 91aa7acab8 wip(vpn): gluetun custom-provider mode with operator's PIA .ovpn
PIA-provider server selection is flaky here (random dead IPs); the operator's .ovpn
uses sweden.privacy.network (load-balanced, reliable). Switch to custom mode
(VPN_SERVICE_PROVIDER=custom, OPENVPN_CUSTOM_CONFIG=/config/pia.ovpn), mount the
pia-custom-ovpn Secret, keep creds + kill-switch + tun-mtu 1300. Drops PIA-provider
server list/updater and native PF (Phase-6 concern). Pending the operator-provisioned
pia-custom-ovpn Secret (not merged until it exists).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-23 00:40:08 -05:00
jakman85 ee349c6d94 Merge feature/vpn-preset-envname into main 2026-08-23 00:18:03 -05:00
jakman85andClaude Opus 4.8 be1e317456 fix(vpn): correct env name PRIVATE_INTERNET_ACCESS_OPENVPN_ENCRYPTION_PRESET
gluetun silently ignored PIA_ENCRYPTION_PRESET (renamed) and defaulted to strong
(RSA-4096) the whole time. The correct v3.x var is
PRIVATE_INTERNET_ACCESS_OPENVPN_ENCRYPTION_PRESET=normal → RSA-2048/AES-128-CBC/1198,
the smaller handshake that fits the 1450 pod MTU.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-23 00:18:03 -05:00
jakman85 93010a5287 Merge feature/vpn-normal-preset into main 2026-08-23 00:09:48 -05:00
jakman85andClaude Opus 4.8 6a44d973b4 fix(vpn): PIA normal preset (RSA-2048/AES-128-CBC/SHA1, 1198) for MTU reliability
RSA-4096 strong handshake wouldn't hold over the pod's 1450 MTU (Cilium VXLAN);
MTU tuning is exhausted (no --tls-mtu in OpenVPN 2.6, PIA rejects --fragment).
Operator downloaded the lower-encryption PIA config (port 1198, RSA-2048,
AES-128-CBC, SHA1) = gluetun's 'normal' preset. Smaller handshake fits 1450.
Dropped the strong-handshake band-aid flags; kept OPENVPN_MTU 1300 for the data channel.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-23 00:09:47 -05:00
jakman85 8bcccf518e Merge feature/vpn-mtu-disc into main 2026-08-22 23:56:28 -05:00
jakman85andClaude Opus 4.8 772d032d4c tune(vpn): --mtu-disc no so oversized handshake packets fragment (not drop)
RSA-4096 strong-preset handshake is marginal over the 1450 pod MTU (Cilium VXLAN).
--mtu-disc no clears DF so oversized control packets fragment through instead of
being silently dropped. Last MTU-path lever (OpenVPN 2.6 has no --tls-mtu).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 23:56:28 -05:00
jakman85 605b99409d Merge feature/vpn-mtu-tune2 into main 2026-08-22 23:50:01 -05:00
jakman85andClaude Opus 4.8 0e2289a2a8 fix(vpn): valid OpenVPN flags only (--hand-window 120; --tls-mtu invalid in 2.6)
OpenVPN 2.6.16 rejects --tls-mtu (not a real option) and PIA doesn't support
--fragment, so control-channel packets can't be shrunk. Keep --hand-window 120 to
give the RSA-4096 handshake more time over a lossy/marginal path, plus tun-mtu 1300.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 23:50:00 -05:00
jakman85 bc42c4bee9 Merge feature/vpn-mtu-tune into main 2026-08-22 23:46:37 -05:00
jakman85andClaude Opus 4.8 b859e52697 tune(vpn): shrink OpenVPN control-channel MTU + widen handshake window
RSA-4096 strong-preset handshake is marginal over the pod's 1450 MTU (Cilium VXLAN).
Lower tun-mtu to 1300 and add --tls-mtu 1200 (smaller control packets) + --hand-window
120 (more time to complete the handshake over a lossy path). Empirical test of the
MTU-tuning path (operator's choice over Cilium native routing).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 23:46:36 -05:00
jakman85 49dca0e8bb Merge feature/vpn-pf-cidr-narrow into main 2026-08-22 23:36:51 -05:00
jakman85andClaude Opus 4.8 7d2cea8402 fix(vpn): narrow FIREWALL_OUTBOUND_SUBNETS to 10.0.0.0/16 (PF gateway overlap)
PIA's PF gateway 10.31.128.1 sits inside the /8 cluster-pool, so
FIREWALL_OUTBOUND_SUBNETS=10.0.0.0/8 made gluetun route it around the tunnel and
port forwarding timed out (getSignature to 10.31.128.1:19999). /16 covers actual
pod allocations and excludes PIA's 10.31.x.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 23:36:51 -05:00
jakman85 1899a54c07 Merge feature/vpn-pia-strong-preset into main 2026-08-22 23:30:47 -05:00
jakman85andClaude Opus 4.8 41234b85f5 fix(vpn): PIA strong encryption preset (RSA-4096/AES-256-CBC/SHA256, port 1197)
Operator's working config is sweden.privacy.network:1197 with RSA-4096, AES-256-CBC,
SHA256 = PIA's 'strong' preset. gluetun defaults PIA to 'normal' (AES-128-GCM), a
cipher mismatch against the 1197 (strong) endpoint, so the handshake never completed
(silent after UDP link). PIA_ENCRYPTION_PRESET=strong matches it and selects 1197.
Reverts the 8080 port red herring.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 23:30:46 -05:00
jakman85 7bdcd6edda Merge feature/vpn-port-8080-live into main 2026-08-22 23:26:17 -05:00
jakman85andClaude Opus 4.8 b76de52b7f test(vpn): use port 8080 (avoid home 1197 return-path conflict), live servers
Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 23:26:17 -05:00
jakman85 b4bd18d716 Merge feature/vpn-updater-enduser into main 2026-08-22 23:17:16 -05:00
jakman85andClaude Opus 4.8 2e5fdd29d7 fix(vpn): gluetun update needs -enduser flag in the init container
Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 23:17:16 -05:00
jakman85andClaude Opus 4.8 a735784f94 fix(vpn): initContainer fetches PIA's current server list (bundled list stale)
UPDATER_PERIOD only refreshes AFTER the tunnel is ready (chicken-and-egg: can't
connect with stale servers), and gluetun's bundled PIA Sweden list is retired
46.246.x (current is 158.173.x). Add an `update-servers` initContainer running
`gluetun update -providers "private internet access"` into a shared /gluetun
emptyDir the main container reads, so it dials current servers. UPDATER_PERIOD
raised to 720h (docs-compliant) for ongoing in-pod refresh.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 23:14:42 -05:00
jakman85 16bf3e3218 Merge feature/vpn-updater-stale-servers into main 2026-08-22 23:08:20 -05:00
jakman85andClaude Opus 4.8 457edb7a38 fix(vpn): enable gluetun server-list updater (bundled list was stale) + re-enable
CORRECTION: the connection failures were gluetun dialing RETIRED PIA IPs (46.246.x
= dead → timeouts, which I mis-read as a network block). A fresh PIA .ovpn connects
from the same host, and PIA's current SE Stockholm servers (158.173.x) are reachable.
Cilium was independently cleared (default-allow, host-fw off, Hubble FORWARDED).

Fix: UPDATER_PERIOD=24h so gluetun fetches PIA's current servers; keep
OPENVPN_MTU/MSSFIX=1350 for the real Cilium-VXLAN 1450 pod MTU (data channel);
PIA default UDP port. Re-enable vpn-egress. Full correction in DECISIONS-LOG.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 23:08:18 -05:00
jakman85 50a416077c Merge feature/vpn-network-blocks-pia into main 2026-08-22 18:15:14 -05:00
jakman85andClaude Opus 4.8 95a55952cc fix(vpn): disable vpn-egress — network blackholes PIA IPs (not ports/MTU/cluster)
Decisive diagnosis: OpenVPN's outbound init packets are 14 bytes with zero
replies (so MTU was never the blocker), pod UDP egress is healthy (NTP replies),
but TCP 501/443 to PIA IPs time out while Google/Cloudflare are OPEN — across many
PIA servers. This 192.168.2.x WiFi segment blackholes PIA's IP ranges (and
intercepts DNS). Not code-fixable. Reverted the port/MTU red-herring env to PIA
defaults; disabled vpn-egress pending an operator network fix (move to the
unfiltered 192.168.1.x LAN, or unblock PIA on the router). Full trace in
DECISIONS-LOG.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 18:15:11 -05:00
jakman85 9fc117e06d Merge feature/vpn-openvpn-mtu into main 2026-08-22 18:03:47 -05:00
jakman85andClaude Opus 4.8 f17c46b767 fix(vpn): shrink OpenVPN tun-mtu/mssfix to 1350 (Cilium VXLAN pod MTU 1450)
Actual root cause (operator-directed layered MTU check): Cilium runs VXLAN
(routing-mode tunnel) so pods get MTU 1450 (1500-50 encap) while node, hypervisor,
and the Google Fiber WAN are all 1500. OpenVPN's ~1500-byte handshake packets
exceed 1450 and are dropped (PMTUD broken). The ports were a red herring.

Fix: OPENVPN_MTU=1350 + OPENVPN_MSSFIX=1350 so encrypted packets (~1402) fit under
1450. Keeps OpenVPN + VXLAN unchanged. Re-enable vpn-egress. Full layered trace
(pod/node/host) in DECISIONS-LOG.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 18:03:46 -05:00
jakman85 5a8fd4f20a Merge feature/vpn-escalate-wireguard into main 2026-08-22 16:47:18 -05:00
jakman85andClaude Opus 4.8 0aab1702e0 chore(vpn): disable vpn-egress, escalate OpenVPN→WireGuard decision
OpenVPN can't connect on this network (each port fails differently, so it's
OpenVPN-specific not a UDP block — NTP/123 works): 1197 = home OpenVPN-server
conflict; 53 = DNS interception; 8080 = TLS handshake fails across servers (MTU
on WiFi+triple-NAT). Recommend pivoting to WireGuard via thrnz/docker-wireguard-pia
(UDP 1337, MTU-robust, ADR-0013 fallback, operator's original preference) — a
spec-level (ADR-0013) change, so escalated. Disabled meanwhile. Full trace in
DECISIONS-LOG.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 16:47:18 -05:00
jakman85 5674458754 Merge feature/vpn-port-8080 into main 2026-08-22 16:39:30 -05:00
jakman85andClaude Opus 4.8 4cde690008 fix(vpn): PIA OpenVPN port 53 -> 8080 (53 is DNS-intercepted on this network)
Port 53 also got no PIA replies: this network transparently intercepts outbound
:53, so dig works but OpenVPN-over-53 is swallowed. An NTP/123 probe from the host
returned fine, proving arbitrary non-53 UDP works bidirectionally (so it's
port-specific: 1197 conflict + 53 DNS-intercept, not a UDP block). Move to 8080
(community-verified for PIA, non-DNS, non-1197).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 16:39:30 -05:00
jakman85 7a88863f71 Merge feature/vpn-port-string-fix into main 2026-08-22 16:33:38 -05:00
jakman85andClaude Opus 4.8 734093cf92 fix(vpn): hardcode OPENVPN_ENDPOINT_PORT "53" as string (Flux var int-coercion)
Wiring the port via "${PIA_OPENVPN_PORT}" made Flux/kustomize emit an unquoted
53 (int) after substitution, which k8s rejects for an env value ("expected
string, got 53"). Same gotcha as the Longhorn numberOfReplicas fix. Hardcode the
quoted string; cluster-var removed with a NOTE explaining why.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 16:33:38 -05:00
jakman85 f73719a474 Merge feature/vpn-openvpn-port-53 into main 2026-08-22 16:28:38 -05:00
jakman85andClaude Opus 4.8 ec5ceb328f fix(vpn): PIA OpenVPN on UDP/53 (avoid home WAN:1197 conflict); re-enable vpn-egress
Operator identified the block: the home network NATs its own OpenVPN server on
WAN:1197, colliding with the cluster's outbound PIA-on-1197 flow (port-specific,
not a general UDP block — UDP/53 worked in tcpdump). PIA accepts OpenVPN on
53/1194/1197/1198/8080/9201; chose 53 (empirically proven to traverse this net).

- cluster-vars: add PIA_OPENVPN_PORT="53"
- gluetun: OPENVPN_ENDPOINT_PORT=${PIA_OPENVPN_PORT}
- re-enable vpn-egress; DECISIONS-LOG resolution noted

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 16:28:37 -05:00
jakman85 347f7a54b6 Merge feature/vpn-blocked-network into main 2026-08-22 15:05:21 -05:00
jakman85andClaude Opus 4.8 9d761872ea fix(vpn): disable vpn-egress — tunnel blocked by home network (env), config kept
Phase-3 VPN config is complete + correct (OpenVPN-UDP, SE Stockholm), but the
OpenVPN UDP/1197 handshake to PIA never gets a reply. Traced with tcpdump: packets
leave pod→node→host→WiFi (SNAT 192.168.2.103) fine, but 0 replies return to the
host, while host UDP/53 works. The 192.168.2.x home router/ISP drops OpenVPN UDP —
upstream of everything in this repo. Reverted to disabled to avoid a crashloop
firing false KubePodCrashLooping alerts; one-line re-enable once the network is
fixed. Full trace in DECISIONS-LOG.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 15:05:20 -05:00
jakman85 e4d856fd83 Merge feature/pia-region-fix into main 2026-08-22 14:51:29 -05:00
jakman85andClaude Opus 4.8 9a108443e8 fix(vpn): PIA_REGION Sweden -> "SE Stockholm" (Gluetun OpenVPN region name)
Gluetun's PIA OpenVPN provider rejects "Sweden"; the valid PF-capable Sweden
region identifier is "SE Stockholm" ("SE Streaming Optimized" lacks port
forwarding). Preserves the operator's Sweden choice.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 14:51:29 -05:00
jakman85 b50433d705 Merge feature/vpn-openvpn-enable into main 2026-08-22 14:49:17 -05:00
jakman85andClaude Opus 4.8 015b423353 feat(vpn): enable vpn-egress on OpenVPN-UDP; align docs to ADR-0013 amendment
Gluetun cannot do PIA over WireGuard (upstream unsupported; live "provider name
is not valid for Wireguard"). Operator approved OpenVPN-UDP and ADR-0013 was
amended in the spec. This aligns the impl:

- platform/kustomization.yaml: re-enable `- vpn-egress` (Phase 3, OpenVPN-UDP)
- gluetun-gateway.yaml: clean stale WireGuard comments (header, image note,
  VPN_TYPE/creds comments); config already VPN_TYPE=openvpn
- README.md: PIA-over-OpenVPN, status=enabled, steering iface wg0 -> tun0
- DECISIONS-LOG.md: disk/drive incident (k3s -> NVMe; failing Seagate) + Phase-3
  OpenVPN resolution

Stale WireGuard comments inside the operator's encrypted pia-credentials.sops.yaml
header left untouched (editing breaks the SOPS MAC; cosmetic).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-22 14:49:16 -05:00
jakman85 41da3d96e5 fix(vpn): Attempting to try OpenVPN protocol with PIA 2026-08-21 23:49:49 -05:00