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

unRAID - how to make it work? #1

Open ahatdude opened 1 year ago

ahatdude commented 1 year ago

Hey, Any chance this could be made to work on unRAID with specific ports?

Thanks.

Stiefmeister commented 1 year ago

Push

soxfor commented 1 year ago

Hey, Any chance this could be made to work on unRAID with specific ports?

Thanks.

Hi @ahatdude What does your setup look like on unRAID? What are you using?

I never used it (unRAID), so, I don't really know how it works, but I believe you're also using docker containers? By that, it could be possible to use this script/image.

Once I get some downtime I might look into this with a trial from unRAID, but no guarantees.

ahatdude commented 1 year ago

Hey soxfor, I appreciate your response. Sorry, I really did not give you anything to go on and I apologise for that. Yes, you are correct that unRAID uses docker images mainly, and it has it's own UI system which really makes life very easy. Often times, containers of popular apps already have templates that we can simply add and then edit with the appropriate variables. I'll show you a screenshot of a random app just for you to understand. I'd be happy to share anything I know so that maybe we could create an image and a template for unRAID users to be able to use this, since it seems to be the only way to specifically choose ports while using ProtonVPN. opera_3OBHheOWWr

Stiefmeister commented 1 year ago

Hi guys,

I have created a template for unraid: image

UPDATE: Got it working now after mounting "/var/run/docker.sock" with read access

Thanks!

soxfor commented 1 year ago

@Stiefmeister great that you got it working!

Yes, mounting the docker.sock to the container can be a security issue, and it's not advised. But so far I couldn't find a replacement for it that allows the executing of commands on another container (in this case, the VPN_CTNAME container) to remove/add the iptables rules for the forwarded port.

I was looking this up, https://wiki.unraid.net/DockerTemplateSchema . Is the template you created possible for export, or it must be done manually via XML? If it can be exported, could you make a push request with a sort of example/template so it can be available on the repo?

ahatdude commented 1 year ago

Hi guys,

I have created a template for unraid: image

UPDATE: Got it working now after mounting "/var/run/docker.sock" with read access

Thanks!

Any chance you can make template public? Here are the instructions: LINK

Thanks for all your help :-)

Stiefmeister commented 1 year ago

Hi guys, I have created a template for unraid: image UPDATE: Got it working now after mounting "/var/run/docker.sock" with read access Thanks!

Any chance you can make template public? Here are the instructions: LINK

Thanks for all your help :-)

Sure, will have a look at it tonight

Stiefmeister commented 1 year ago

Attached the DockerTemplate my-qbittorrent-natmap.zip

If you want to use it simply copy the XML file to /boot/config/plugins/dockerMan/templates-user/ and you should be able to select it when adding a docker in docker tab

ahatdude commented 1 year ago

Thanks a bunch @Stiefmeister ! I will give it a shot soon. In the meantime, I will ping @soxfor to ask if you're interested in doing the second part of it to actually have a full template on the "community apps" in unRAID. On this LINK the part of "Publishing to CA" could be interesting to make it easier for all unRAID users to find this amazing creation :-) If you're not interested that's fine, if you'd want some help I'd be glad to.

Thanks to both of you!

ahatdude commented 1 year ago

Attached the DockerTemplate my-qbittorrent-natmap.zip

If you want to use it simply copy the XML file to /boot/config/plugins/dockerMan/templates-user/ and you should be able to select it when adding a docker in docker tab

I tried getting this to work and I'm having trouble with the configurations needed on qbit, I think. Or maybe even GluetunVPN since it's the first time I'm using it. Would you be able to provide me with your qbittorrent template (a screenshot will do), as well as the gluetun one? (redact any sensitive info) I currently have a setup of 6 qbits running, all using their individual IPs and individual ports for upload (currently not working because the ports aren't forwarded) as well as wireguard profiles. My question would be if it would be possible to maintain my exact setup and just route all of my qbit containers through Gluetun and have it all working with their individual ports?

I know this is a complex setup, however it's what works best for my specific needs.

Thanks for any help.

soxfor commented 1 year ago

Attached the DockerTemplate my-qbittorrent-natmap.zip

If you want to use it simply copy the XML file to /boot/config/plugins/dockerMan/templates-user/ and you should be able to select it when adding a docker in docker tab

Thank you @Stiefmeister , I'll try too look at it during the weekend. Work has been a pita.

Attached the DockerTemplate my-qbittorrent-natmap.zip If you want to use it simply copy the XML file to /boot/config/plugins/dockerMan/templates-user/ and you should be able to select it when adding a docker in docker tab

I tried getting this to work and I'm having trouble with the configurations needed on qbit, I think. Or maybe even GluetunVPN since it's the first time I'm using it. Would you be able to provide me with your qbittorrent template (a screenshot will do), as well as the gluetun one? (redact any sensitive info) I currently have a setup of 6 qbits running, all using their individual IPs and individual ports for upload (currently not working because the ports aren't forwarded) as well as wireguard profiles. My question would be if it would be possible to maintain my exact setup and just route all of my qbit containers through Gluetun and have it all working with their individual ports?

I know this is a complex setup, however it's what works best for my specific needs.

Thanks for any help.

Hi @ahatdude

AFAIK, at least with ProtonVPN you only can request 1 (one) port forward per VPN connection, so in theory you'l need to have 6 Gluetun containers, 1:1 to qbittorrent ratio, and another 6 of this one (at least with how it works now).

ahatdude commented 1 year ago

I appreciate your response, I was thinking that would be the case, but it's good to have a confirmation. I am trying it out with one container for now, and having some trouble having your "qbittorrent-natmap" contacting qbittorrent. My current setup involved having my qbittorrents on the br0 network with specific IPs. Since "qbittorrent-natmap" needs to be routed through GluetunVPN, it is not on a network per se, does Gluetun have to be on the br0 network? I've tried most variations of both of them on the same network (custom docker network) or br0. Anything you can think of? This is the error I'm getting from your container: Unable to reach qBittorrent at 192.168.1.81:49998

EDIT: the GluetunVPN container is connecting fine to the VPN