diff --git a/setup/advanced/vpn-port-forwarding.md b/setup/advanced/vpn-port-forwarding.md index c047092..bae76a6 100644 --- a/setup/advanced/vpn-port-forwarding.md +++ b/setup/advanced/vpn-port-forwarding.md @@ -34,6 +34,14 @@ Notes: - one can bind mount a shell script in Gluetun and execute it with for example `VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c /gluetun/myscript.sh` - 💁 feel free to propose a pull request to add commonly used shell scripts for port forwarding! - the output of the command is written to the port forwarding logger within Gluetun +### qBittorrent example + +`VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c 'wget -O- --retry-connrefused --post-data "json={\"listen_port\":{{PORTS}}}" http://127.0.0.1:8080/api/v2/app/setPreferences 2>&1'` + +For this to work, the qBittorrent web UI server must be enabled and listening on port `8080` and the Web UI "Bypass authentication for clients on localhost" must be ticked (json key `bypass_local_auth`) so Gluetun can reach qBittorrent without authentication. + +Thanks to [@Marsu31](https://github.com/Marsu31) + ## Allow a forwarded port through the firewall For non-native integrations where you have a designated forwarded port from your VPN provider, you can allow it by adding it to the environment variable `FIREWALL_VPN_INPUT_PORTS`.