Our great sponsors
-
arch-int-vpn
Docker build script for Arch Linux base with OpenVPN, WireGuard, Privoxy (http(s) proxy) and microsocks (Socks5 proxy)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I have gone down a rabbit hole today trying to route all Docker container traffic through OpenVPN. Previously I have used dperson/openvpn-client, but I would prefer to run OpenVPN directly on the host. With the VPN up on the host, the Docker containers make use of the VPN connection but if it drops they continue without it. Ideally there would be a kill switch to prevent this from happening.
Personally I use docker containers, then route all other containers through my VPN one. There's a script that sets iptable rules to only allow traffic over the VPN IP that you might find useful - https://github.com/binhex/arch-int-vpn/blob/master/run/root/iptable.sh