Ensure all Docker traffic passes through OpenVPN connection

This page summarizes the projects mentioned and recommended in the original post on /r/selfhosted

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • openvpn-client

  • 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.

  • arch-int-vpn

    Docker build script for Arch Linux base with OpenVPN, WireGuard, Privoxy (http(s) proxy) and microsocks (Socks5 proxy)

  • 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

  • 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.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts