I’m using a wireguard docker container to provide vpn connection to a qbittorrent container. When I compare it to wireguard on linux and the qbittorrent application, the same torrent is way slower. My server gets 2Mbit/s and my computer 15Mbit/s The 15Mbit/s is where my internet connection caps, while downloading that fast I can’t watch YT videos. They both are in the same network using the same vpn provider and same endpoint.

for qbittorrent docker-compose I use network_mode: service:wireguard

  • bruchsturmOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    kinda fixed it, I think…

    Checked what image I’m using, its linuxserver, and they’re using the OS’s kernel implementation. Also saw that in my logs.

    I used this https://www.linuxserver.io/blog/routing-docker-host-and-container-traffic-through-wireguard and added these lines into my wg0.conf:

    PostUp = iptables -t nat -A POSTROUTING -o wg+ -j MASQUERADE
    PreDown = iptables -t nat -D POSTROUTING -o wg+ -j MASQUERADE
    

    Then I regenerated my mullvad config with a different server.

    Now I’m downloading the Arch Linux iso with 11Mbit/s

    Honestly I’ve no idea what exactly solved the problem, iptables, networks and routing still feels likes witchcraft to me most of the time.