Howdy,
I installed the default TrueNAS Deluge app on my TrueNAS machine. Im trying to find the optimal way to route deluge traffic through a VPN. Would anyone have any guidance on how best to achieve that?
If you are running jailmaker with docker… you can have a solution right now…
If you are waiting for native docker, you will need to wait for electric eel
Here is the docker compose solution using gluetun to connect your vpn… all lines starting with # you would need to fill out.
You could just as easily use deluge in place of my qbit example
https://hub.docker.com/r/linuxserver/deluge
just make sure to get its compose right…
The idea is simple gluetun connects to our VPN provider port 8085 is the web management port to get into the torrent app… the torrent app only has network access through gluetun which only allows access if its VPN is UP… You could also just build this stack out with addition apps you want behind the VPN
***Remember Docker is the future Truenas Scale
Docker Compose
services:
gluetun:
container_name: qbit-gluetun
image: qmcgaw/gluetun:v3.38.0
user: 0:568
ports:
- 6881:6881 # Torrent
- 6881:6881/udp # Torrent
- 8085:8085 #path to qbit
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun:/dev/net/tun
restart: unless-stopped
environment:
- PUID=568
- #VPN_SERVICE_PROVIDER=Enter Provider name
- #VPN_TYPE=wireguard
- #WIREGUARD_PRIVATE_KEY=Enter Key
- #WIREGUARD_PRESHARED_KEY=Enter Key
- #WIREGUARD_ADDRESSES=Enter IP
- #SERVER_COUNTRIES=Enter Country
- #TZ=Enter Timezone
- FIREWALL_OUTBOUND_SUBNETS=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
volumes:
#- /mnt/pathonhostforgluetunstorage:/gluetun
qbittorrent:
container_name: qbittorrent #temporary passowrd in container logs
image: ghcr.io/linuxserver/qbittorrent:libtorrentv1-release-4.6.5_v1.2.19-ls31
restart: unless-stopped
environment:
- #PUID=Enter PUID
- #PGID=Enter GUID
- #TZ=Enter Timezone
- WEBUI_PORT=8085
network_mode: service:gluetun
depends_on:
- gluetun
volumes:
#- /mnt/pathonhostforqbitconfigstorage:/config
#- /mnt/pathonhostforqbitdownload:/mnt/download
While not yet possible with the official TrueNAS chart apps, you could also try the binhex docker images with embedded VPN support. (i.e. for Deluge: https://hub.docker.com/r/binhex/arch-delugevpn/)
Otherwise, I just created a feature request, so that this might get a native integration to the official charts.