soxfor / qbittorrent-natmap

The objective of this container is to run a script that requests a port forward (via NAT-PMP) from the VPN provider and upon success changes the listening port of the qBittorrent client when running in Docker
149 stars 18 forks source link
docker protonvpn qbittorrent vpn wireguard

qBittorrent-NatMap

The objective of this container is to run a script that requests a port forward (via NAT-PMP) from the VPN provider and upon success changes the listening port of the qBittorrent client when running in Docker

This solution is currently in use and tested with Gluetun and qBittorrent from Linuxserver.io and with VPN fron ProtonVPN using Wireguard.

What made me do this?

The need to improve the seeding/upload performance and not finding any work done for this scenario (qBittorrent using docker'ized VPN), but finding this post on reddit by u/TennesseeTater for Deluge made me try and do something similar. His post is also referenced in the ProtonVPN Guide.

Why not modify the Gluetun image and include natpmpc there?

Well, as far as I could find, Alpine Linux doesn't have natively the binary for natpmpc, the NAT-PMP client used to request the port forward as per the instructions for manual mapping on ProtonVPN. Gluetun is using alpine as it's base image.

On AlpineLinux package info: natpmpc binary not found and here a request still in open state.

If I had the binary needed on the Gluetun container a script running on the host system instead of the container would probably suffice, allowing the following action: doing "docker exec natpmpc "

What does the script do/modify?

So far:

These actions are performed continuously (in a loop, every 5 minutes (default, can be lowered/increased)), most likely an option to set a failure count will be added in the future.

Configurable variables: