@selfhosted Have a commerical @wireguard vpn on my server. The problem i have is that if i use a docker, it does use the vpn interface with iptables, but if that goes down, the docker still goes through without the vpn interface. I have looked at iptables, but docker makes it own, and bit of a minefield. Any ideas? Thanks

  • atzanteol
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 months ago

    Maybe somebody else will provide more info, but by default docker usually creates a bridge for your containers called docker0 and uses the local system’s routing tables.

    You need to figure out how to either create a new docket network that only routes via the VPN or do that for your host as well.