feat(fw,web-arm): replace cyberghost germany exit with a wireguard tunnel via web-arm #151
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos#151
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Context
PR #149 + #150 added a toggleable CyberGhost Germany exit on fw (OpenVPN,
cyberghost-de.target) that policy-routes the Apple TV (10.42.99.15) for geo-unblocking ARTE/ARD/ZDF/Joyn. It works, but CyberGhost throughput is too low for streaming. Replace the transport with a self-hosted WireGuard tunnel terminating on web-arm (Hetzner, German IPv4), keeping the toggle UX identical.Agent Brief
Category: enhancement
Summary: web-arm becomes a WireGuard exit node; fw's German-exit toggle routes the Apple TV through it instead of CyberGhost, which gets removed.
Current behavior:
fw runs an OpenVPN client (CyberGhost DE) plus a policy-routing unit, both hanging off a systemd target. The routing unit installs, for each client IP (currently only the Apple TV), an ip rule pair: local
10.42.96.0/20→ main (priority 90), everything else → tablevpn-de/101 (priority 100). The table holds a tunnel default route (metric 50, managed by OpenVPN up/down hooks) and anunreachable default(metric 100) as kill switch. nftables has an rpfilter exemption, a multimedia→tunnel forward accept, and masquerade for the tunnel interface. Target off at boot; start = German, stop = Austrian. CyberGhost is too slow.Desired behavior:
wg_cloonarclient interface and the ADR-0010 IPv6 arrangement must remain untouched; the new tunnel is IPv4-only inside.wg_cloonarpeer claimsallowedIPs 10.42.0.0/16, and other fw tunnels claim10.43.0.0/16,10.50.x,10.14.x. The new tunnel's transfer net must be outside all of these (e.g. something in10.44.x.x/30) or web-arm/fw will route replies into the wrong tunnel.web-arm.cloonar.com:<port>),allowedIPs 0.0.0.0/0but without installing routes into the main table (allowedIPsAsRoutes = falseor equivalent) — it must not hijack fw's default route.tun-cg-denftables references go away (replaced by the wg interface name). Thecyberghost-auth/-ca/-cert/-keyentries in fw's secrets are no longer referenced; flag them for maintainer removal — do not edit secrets files.de-exit(semantics identical); keep table namevpn-de/101 and the client-list structure.Key interfaces:
de-exit.target(successor ofcyberghost-de.target) — same start/stop/boot semanticsvpn-de101, per-client list with10.42.99.15as sole membernetworking.wireguard.interfaceson both hosts; fw side must disable allowedIPs-derived routeswg_de_exit_key(private key) in each host's secrets store; public keys live in the Nix configPrerequisites (maintainer, before an AFK run):
wg genkey | tee ... | wg pubkey)wg_de_exit_keyto fw's and web-arm's encrypted secretsAcceptance criteria:
systemctl start de-exit.targeton fw → Apple TV egresses with web-arm's German IPv4; an ARD/ZDF live stream actually plays (validates the Hetzner datacenter range isn't geo-blocked)systemctl stop de-exit.target→ Apple TV egresses Austrian again, immediatelywg_cloonar, v6 egress (ADR 0010), and public web services unaffectedOut of scope:
Maintainer-supplied WireGuard parameters for the de-exit tunnel:
gXWzhBsMImSX2++S9lNlqyLgcUaBSYUo3mJ4JJRkkiM=MFQNf2IHykuSis0yKMx8W4w/601o596kTd52rfXiyzQ=51820wg_de_exit_key(maintainer-managed).