Closed TobiasS1402 closed 2 years ago
Did you ever figure this out on your own?
I got it to work tonight after most of a day of trying different things.
I started up the container, downloaded a text editor (VIM), then used it to edit /etc/qbittorrent/start.sh to add the lines:
INCOMING_PORT=$(/config/openvpn/port_forwarding.sh | grep -E -o [0-9]*) echo "Forwarded Port: ${INCOMING_PORT}"
this should be added outside of any 'if ... fi' blocks, right before ${INCOMMING_PORT} is referenced for the first time (near the end of the /etc/qbittorrent/start.sh file)
next, you'll need to look for a line that includes "sed -i " and has some '@' symbols in it. In that line, there's a spot where is says "Connection\\PortRangeMin" - change it to "Connection\\\\PortMinRange" (this corrects a bug in the code with how the Port Range would be written to the config file).
After that, download the Port_Forwarding.sh file from https://www.privateinternetaccess.com/helpdesk/kb/articles/can-i-use-port-forwarding-without-using-the-pia-client
and drop it into your /config/openvpn/
After that, you'll want to commit your changes to your docker container with 'docker commit [container name] [new image name]'
build & start a container with the new image you created, and that'll automatically setup port forwarding, and set qbittorrent to use the right port.
@WizarrdCodely Thanks, it's working great. You made a typo : Connection\\PortMinRange -> Connection\\PortRangeMin
It would be great if this could be upstreamed in some way like the one in binhex's image https://github.com/binhex/arch-qbittorrentvpn/blob/master/run/nobody/qbittorrent.sh#L57
Is there any way i myself can modify this container to make QBT port forwarded with the PIA vpn? Or is there any way you can add this?
I am a github noob so i didnt know where to submit this.