Bypass network entries get routed into a bypass VPN tunnel #221
Loading…
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?
Network entries (bypass.set_network_rules) mark forwarded traffic with the same fwmark the app cgroup uses, so it resolves through the same table 11. That table's default is the physical link only until a bypass VPN tunnel comes up - then the tunnel replaces it (bypass_up.sh for OpenVPN, the table-11 route for WireGuard, #216), and every listed network's traffic is redirected into the bypass tunnel: forwarded, so not masqueraded, so rejected by the server, retransmitted at line rate.
That inverts the feature: network entries exist to route forwarded traffic past the tunnel (#168's case - a container running its own VPN must not be double-tunnelled). Hit live 2026-09-16 with gluetun's subnet listed and a WireGuard bypass up: 43 GiB pushed into wg_aqomui_b in ten minutes, and the per-peer queue starvation hung every bypassed app's connection too. An OpenVPN bypass tunnel misroutes the same way, just without the starvation making it obvious.
Fix: give network entries their own mark and routing table, defaulting to the physical link and never touched by a bypass tunnel. Apps keep table 11 (tunnel if present); networks get table 12 (always physical).