Configure Transmission BitTorrent with a VPN service

hi, is it possible, and if yes how big of an undertaking would it be to have a NS transmission process which only runs over vpn?

Could you reword please your request, I have not understood your issue.

eh :slight_smile: sure. id like to use the transmission application from your repo. but it will only be useful to me if it connects through my paid vpn (nordvpn) service. so i guess in short. how to config transmission with a vpn service.
thanks

1 Like

interesting, nethserver-transmission is not aware I think about VPN, probably if you use globally a VPN for the server then Transmission could use a VPN to download/upload torrent. In France it is mostly when you upload a torrent that you could have problems, even of course if the download of a torrent is forbidden.

However you could use some transmission docker container customized for the VPN, it should be something funny : https://github.com/haugene/docker-transmission-openvpn

I have not really the time yet, but in short I would be interesting by a howto

install nethserver-docker
create the container transmission
create a reverse proxy to use transmission on the container port

yeah something like that… sweet :slight_smile: i might give it a try… was just thinking about that cause my usual way hit a bump in the road… Port Forwards Not Working

so that was fairly easy… would be really great if you could check my process of installing it once you have the time.
still need to play around with this setup, - think ports are still closed, and i am unsure about that systemd user thing. i am starting it at the moment without any user. but created a transmission user while doing trail and error.
totally unsure about all of this :slight_smile: -> my very first docker experience… i downloaded the nethserver iso with the transmission ui and all went fine…

DOCKER

pkg

yum install nethserver-docker
yum update --enablerepo=docker-ce-stable

update & enable

config setprop docker enableRepository enabled
signal-event nethserver-docker-update

config

config show docker

  • After each change, you have to restart docker
    signal-event nethserver-docker-update

portainer

config setprop portainer status enabled
signal-event nethserver-docker-update

https://192.168.1.1:980/portainer/

get transmission-openvpn

docker pull haugene/transmission-openvpn

start

docker run --cap-add=NET_ADMIN -d
-v /mnt/tank/downloads/tst:/data
-v /etc/localtime:/etc/localtime:ro
-e CREATE_TUN_DEVICE=true
-e OPENVPN_PROVIDER=NORDVPN
-e OPENVPN_USERNAME=VPNUSER
-e OPENVPN_PASSWORD=‘VPNPASS’
-e WEBPROXY_ENABLED=false
-e LOCAL_NETWORK=192.168.1.0/24
–log-driver json-file
–log-opt max-size=10m
-p 9091:9091
haugene/transmission-openvpn

systemd

vi /etc/systemd/system/transmission-openvpn.service

[Unit]
Description=haugene/transmission-openvpn docker container
After=docker.service
Requires=docker.service

[Service]
#User=transmission
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill transmission-openvpn
ExecStartPre=-/usr/bin/docker rm transmission-openvpn
ExecStartPre=/usr/bin/docker pull haugene/transmission-openvpn
ExecStart=/usr/bin/docker run \
        --name transmission-openvpn \
        --cap-add=NET_ADMIN \
        -v /mnt/tank/downloads/:/data \
        -e "OPENVPN_PROVIDER=NORDVPN" \
        -e "OPENVPN_USERNAME=VPNUSER" \
        -e "OPENVPN_PASSWORD=VPNPASS" \
        -e "OPENVPN_OPTS=--inactive 3600 --ping 10 --ping-exit 60" \
        -e "NORDVPN_COUNTRY=DE" \
        -e "NORDVPN_CATEGORY=legacy_p2p" \
        -e "NORDVPN_PROTOCOL=tcp" \
        -e "TRANSMISSION_UMASK=0" \
        -e "TRANSMISSION_WEB_UI=combustion" \
        -e "TRANSMISSION_SCRAPE_PAUSED_TORRENTS_ENABLED=false" \
        -e "WEBPROXY_ENABLED=false" \
        -e "LOCAL_NETWORK=192.168.1.0/24" \
        -p 9091:9091 \
        --log-driver json-file \
        --log-opt max-size=10m \
        --dns 8.8.8.8 \
        --dns 8.8.4.4 \
        haugene/transmission-openvpn
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

service

systemctl enable transmission-openvpn.service
systemctl start transmission-openvpn.service
systemctl stop transmission-openvpn.service

todo:
check if it actually is using the vpn
webui is complaining about closed ports

transmission config:

thats what i did for the user creation, but will want to revert that somehow if i dont need it.

user

useradd -r -s /usr/sbin/nologin -d /mnt/tank/downloads/transmission -m transmission
chmod 755 /mnt/tank/downloads/

there is a option in the config to set PUID and PGID for the folder if not set it will run as root. guess thats my main question… what user should the service start. i am storing the data in a nfs directory.

1 Like