[Support] binhex - rTorrentVPN


Recommended Posts

On 2/14/2020 at 8:38 PM, gnunin said:

Yeah, I've read that and all my VLANS that need to talk to each other are connected as they should. My desktop is on the .20 VLAN that have full access to the host (.30) VLAN.

although your vlan's are defined correctly to allow all traffic across multiple networks, this container is very strict as to what is permitted in/out, thus you need to define LAN_NETWORK to allow all your vlan's, using a comma to separate each network, e.g.:-

192.168.20.0/24,192.168.30.0/24

 

Link to comment
9 hours ago, eman31 said:

I'm trying to run this without the VPN option and am having a hard time figuring out how to get a port open on my router for seeding. Is there a guide somewhere showing the correct settings? I've read through this forum but haven't had much luck or I'm missing something. Any help would be appreciated.

so get a port forward setup on your router, once you have chosen a port then edit the file /config/rtorrent/config/rtorrent.rc and set the same port for the incoming port, note its a range in this file, so if its a single port then just define the same port twice with a hyphen between the ports, e.g.

network.port_range.set = 1234-1234

where 1234 is the port number you have set as a port forward on your router.

Edited by binhex
Link to comment
5 hours ago, binhex said:

so get a port forward setup on your router, once you have chosen a port then edit the file /config/rtorrent/config/rtorrent.rc and set the same port for the incoming port, note its a range in this file, so if its a single port then just define the same port twice with a hyphen between the ports, e.g.


network.port_range.set = 1234-1234

where 1234 is the port number you have set as a port forward on your router.

Thanks for the reply and sorry to be a total noob, what IP address do I forward the port to on my router? Is it the address of my unraid server or does the docker have it's own IP? I've tried the server address but it still says the port is closed. Should the STRICT_PORT_FORWARD in the docker setting be set to "yes" or "no"? I previously had it set to yes running with PIA.

Link to comment
1 minute ago, eman31 said:

Is it the address of my unraid server

yes.

1 minute ago, eman31 said:

Should the STRICT_PORT_FORWARD in the docker setting be set to "yes" or "no"?

it makes no difference if using this docker image with VPN_ENABLED = no, that is what you are doing right?, as per your comment below:-

 

15 hours ago, eman31 said:

I'm trying to run this without the VPN option

if you ARE attempting to setup port forwarding with the vpn enabled then that is a completely different scenario.

  • Thanks 2
Link to comment
6 minutes ago, eman31 said:

Thanks for the reply and sorry to be a total noob, what IP address do I forward the port to on my router? Is it the address of my unraid server or does the docker have it's own IP? I've tried the server address but it still says the port is closed. Should the STRICT_PORT_FORWARD in the docker setting be set to "yes" or "no"? I previously had it set to yes running with PIA.

While I know next to nothing about Unraid, I would like to add to binhex answer above. There are 3 layers to think about when setting up port forwarding:

 

1. rtorrent has to be configured to listen at the desired port (what you did with rtorrent.rc)

2. Docker has to publish the ports to the outside world (e.g, with -p 1234:1234)

3. Your router has to forward requests to your Unraid box. That's what you do in the router's admin interface passing your Unraid server IP and port. Other than that you may also want to set your router DHCP server to always allocate the same IP to your Unraid box so that the setup is stable.

 

Cheers,

  • Like 1
  • Thanks 1
Link to comment

 

34 minutes ago, binhex said:

yes.

it makes no difference if using this docker image with VPN_ENABLED = no, that is what you are doing right?, as per your comment below:-

 

if you ARE attempting to setup port forwarding with the vpn enabled then that is a completely different scenario.

Correct, VPN_ENABLED is set to no but I wasn't sure about the other settings below that.

 

So what I've done so far is:

Stopped RTorrent docker.

Edited rtorrent.rc by uncomment line 77 and added a port range of 54130-54130.

Restarted RTorrent docker.

Add port forwarding rule to my router at IP 192.168.1.xx on port 54130.

Reboot router.

Start Rutorrent webui.

 

Everything starts fine but shows port 54130 Closed in the connection bar.

 

 

113188788_Screenshot(30)edited.thumb.jpg.f99319748dc9bd740ab517fc51a51b38.jpg

1581854766_Screenshot_2020-02-17NETGEARRouterR70002.thumb.jpg.e206d165b2fdcfff8d9fa727f544e127.jpg2123429361_Screenshot(32)edited.thumb.png.66d3d24285da7f3d2b2d3d2a5e74968c.png

Link to comment
3 hours ago, Cat_Seeder said:

While I know next to nothing about Unraid, I would like to add to binhex answer above. There are 3 layers to think about when setting up port forwarding:

 

1. rtorrent has to be configured to listen at the desired port (what you did with rtorrent.rc)

2. Docker has to publish the ports to the outside world (e.g, with -p 1234:1234)

3. Your router has to forward requests to your Unraid box. That's what you do in the router's admin interface passing your Unraid server IP and port. Other than that you may also want to set your router DHCP server to always allocate the same IP to your Unraid box so that the setup is stable.

 

Cheers,

I didn't see this when I was replying to binhex. Maybe 2. is what I'm missing. How would I run this parameter?

 

Edit: Ok I figured it out how to run the command by searching a little more.

 

In advanced view I added -p '54130:54130' to one of the empty lines at the top  and now it's showing connected.

 

Thanks for all the help! This has been driving me crazy for a week and I just wasn't able to find any solutions with all my searching.

Edited by eman31
Added fix
  • Like 2
Link to comment

I've enabled the autodl-irssi and attempted to set it up with my Trackers but I keep getting Timed out due to repeated attempts. If I ssh into the container and irssi I can see that it displays my 'nick' as "ISPPROVIDER@KJ7N_UKN9" etc not too sure what is happening, I haven't changed any settings in the config. I am also getting banned from the IRC' for attempting to use irc while root? I assume this means root user? How can I fix this? Any suggestions are appreciated sorry for the ignorance. Thank you

Link to comment
38 minutes ago, noraa said:

I am also getting banned from the IRC' for attempting to use irc while root? I assume this means root user? How can I fix this? Any suggestions are appreciated sorry for the ignorance. Thank you

Check out the conversation between WiperWoper, binhex and me starting bellow. Long story short, you need to set the right UID and GID.

 

Link to comment
On 2/14/2020 at 5:05 PM, WiperWoper said:

Quick update for @binhex and @Cat_Seeder, I got the issue with the users resolved and it's working now. No more bans from tracker ircs (hopefully). Thanks for the help and patience :)

Hey @WiperWoper I was wondering how you created the user for rTorrent irssi? I can't seem to get it worked and am also getting banned from IRC for running as root. Thank you!

Link to comment
5 hours ago, Cat_Seeder said:

Check out the conversation between WiperWoper, binhex and me starting bellow. Long story short, you need to set the right UID and GID.

 

I tried creating a new user following the readme. I created a new user "autodl" with uid/gid of 500 and applied to to the docker settings but upon launching I noticed in the logs it's saying

 

Set uid to user 0 succeeded
2020-02-18 11:32:40,281 INFO supervisord started with pid 6
2020-02-18 11:32:41,283 INFO spawned: 'irssi-script' with pid 108
2020-02-18 11:32:41,285 INFO spawned: 'logrotate-script' with pid 109
2020-02-18 11:32:41,286 INFO spawned: 'pyrocore-script' with pid 110
2020-02-18 11:32:41,287 INFO spawned: 'rutorrent-script' with pid 111
2020-02-18 11:32:41,289 INFO spawned: 'start-script' with pid 112
2020-02-18 11:32:41,290 INFO spawned: 'watchdog-script' with pid 113
2020-02-18 11:32:41,291 INFO reaped unknown pid 7

 

Shouldn't it be running this with the newly created autodl user? I have changed it in the docker settings and deleted the perms.txt as well as the entire container and /config. Any suggestions are appreciated.

Link to comment
On 2/17/2020 at 4:51 AM, binhex said:

tbh i haven't, if its a bug in rtorrent then all i can suggest is that you create a github 'issue' to see if it can be resolved, link below:-

https://github.com/rakshasa/rtorrent/issues

There are some fixes in those topics I linked too about the GUI freezing up on public torrents. Is it possible to use those on this container? Maybe from the command line or something? @binhex
 

Also, anyone else reading this, are you able to use public torrents without the GUI freezing up constantly? I can recreate my issue very easily by adding any Linux iso torrent using the RARBG trackers. Upon adding, the GUI will quickly start becoming unresponsive. Trying to refresh it will hang and load for a few seconds or minutes or longer. Removing the torrent fixes the issue instantly. Curious if anyone else is experiencing this.

Link to comment
51 minutes ago, noraa said:

Shouldn't it be running this with the newly created autodl user? I have changed it in the docker settings and deleted the perms.txt as well as the entire container and /config. Any suggestions are appreciated.

Just to verify.

 

1. You have created a new user in the host right?

2. Have you given access to your shared folders in the host to this new user?

3. Have you passed the new user's UID and GID through PUID and PGID docker's environment variables as mentioned in https://github.com/binhex/arch-rtorrentvpn/blob/master/README.md?

 

Just to clarify, no new user has to be created in the container. Actually, you don't even need to create a new user in the host unless you need isolated permissions for security reasons, all that is required for you to do is to figure out the UID and GID of an existing user (in the host) with the right permissions to access the folders that you're sharing. Once you have the user's UID and GID, feed the values to the container using PUID and PGID environment variables.

Edited by Cat_Seeder
Link to comment
16 minutes ago, Cat_Seeder said:

Just to verify.

 

1. You have created a new user in the host right?

2. Have you given access to your shared folders in the host to this new user?

3. Have you passed the new user's UID and GID through PUID and PGID docker's environment variables as mentioned in https://github.com/binhex/arch-rtorrentvpn/blob/master/README.md?

 

Just to clarify, no new user has to be created in the container. Actually, you don't even need to create a new user in the host unless you need isolated permissions for security reasons, all that is required for you to do is to figure out the UID and GID of an existing user (in the host) with the right permissions to access the folders that you're sharing. Once you have the user's UID and GID, feed the values to the container using PUID and PGID environment variables.

1. I executed the "Useradd" command as root creating the user with the UID/GID of 500.

2. Not entirely sure how to do this so this could be the issue? Sorry for the ignorance.

3. I did try passing the UID and GID of 500 in the environment variables after deleting the perms.txt with no luck.

 

How do I determine whether or not a user has the right permissions? I have also tried passing it to the other users that I have with no luck. Again sorry for the ignorance I really appreciate the help!

Link to comment
19 minutes ago, noraa said:

1. I executed the "Useradd" command as root creating the user with the UID/GID of 500.

Ok, I assume that this was done in the host right? (As in, your Unraid Box, not your container).

19 minutes ago, noraa said:

2. Not entirely sure how to do this so this could be the issue? Sorry for the ignorance.

 

19 minutes ago, noraa said:

 

How do I determine whether or not a user has the right permissions? I have also tried passing it to the other users that I have with no luck. Again sorry for the ignorance I really appreciate the help!

You are mounting several volumes from your host into your container right? 

For instance, using the options bellow taken from rtorrentvpn's README: -v /root/docker/data:/data \ -v /root/docker/config:/config 

 

/root/docker/data and /root/docker/config are both folders in the host owned by a user (example: docker), this user most likely has read and write permissions to the folder that it owns. 

 

I'm not familiar with Unraid but if you have ssh access to your host, the following command will display the owner and group of a folder: 

 

ls -l /path/to/folder

 

Once you know the owner of the group you can obtain the UID and GID with the id commad (https://kb.iu.edu/d/adwf), and pass it to your docker container.

 

Don't forget do clean the folders before starting the container to avoid permission issues.

Link to comment
34 minutes ago, Cat_Seeder said:

Ok, I assume that this was done in the host right? (As in, your Unraid Box, not your container).

 

You are mounting several volumes from your host into your container right? 

For instance, using the options bellow taken from rtorrentvpn's README: -v /root/docker/data:/data \ -v /root/docker/config:/config 

 

/root/docker/data and /root/docker/config are both folders in the host owned by a user (example: docker), this user most likely has read and write permissions to the folder that it owns. 

 

I'm not familiar with Unraid but if you have ssh access to your host, the following command will display the owner and group of a folder: 

 

ls -l /path/to/folder

 

Once you know the owner of the group you can obtain the UID and GID with the id commad (https://kb.iu.edu/d/adwf), and pass it to your docker container.

 

Don't forget do clean the folders before starting the container to avoid permission issues.

Correct it was done in the Unraid Box and not the container using "useradd -u 500 autodl" I have a mounting points for my Downloads and Config

-v /mnt/user/Downloads/autodl:/config \ 

-v /mnt/user/appdata/binhex-rtorrentirssi:/config \

 

Inputting the ls -l /mnt/user/appdata/binhex-rtorrentirssi I get the following https://pastebin.com/68prCuAe

It looks like every folder is going to the correct User/Group except for the perms.txt? I have tried deleting the Folder and relaunching with no success. Thanks for your patience and help.

 

Edit: So I managed to change the permission of the folders and now when I execute the ls -l command all of the directories are owned by the autodl user/group, however the error is still there. I noticed when launching the irssi it's giving me a user_name of root and a nick of root. Then this error  

 

Closing link: ([email protected]) [K-Lined: Don't IRC as root!]

 

I'm out of ideas..

 

Edited by noraa
Link to comment

I love this container. thanks for the development effort.

 

The container works well with PIA and Toronto destination, but keeps going offline for long periods of time. When I restart it connects and comes back immediately.  Does anyone have a suggestion to keep things online?

 

The log write entry when it is offline is : 

Quote

 

Line 423 : [info] Attempting to curl https://portchecker.co/check...
Line 424 : 2020-02-18 14:52:02,591 DEBG 'watchdog-script' stdout output:
Line 425 :
Line 426 : [info] Curl successful for https://portchecker.co/check, response code 200
Line 427 : 2020-02-18 14:22:00,420 DEBG 'watchdog-script' stdout output:
Line 428 :
Line 429 : [info] Attempting to curl https://portchecker.co/check...
Line 430 : 2020-02-18 14:21:59,979 DEBG 'watchdog-script' stdout output:
Line 431 :
Line 432 : [info] Curl successful for https://portchecker.co/check, response code 200
Line 433 : 2020-02-18 13:51:57,624 DEBG 'watchdog-script' stdout output:

 

 

Link to comment
5 hours ago, noraa said:

Correct it was done in the Unraid Box and not the container using "useradd -u 500 autodl" I have a mounting points for my Downloads and Config

-v /mnt/user/Downloads/autodl:/config \ 

-v /mnt/user/appdata/binhex-rtorrentirssi:/config \

 

Inputting the ls -l /mnt/user/appdata/binhex-rtorrentirssi I get the following https://pastebin.com/68prCuAe

It looks like every folder is going to the correct User/Group except for the perms.txt? I have tried deleting the Folder and relaunching with no success. Thanks for your patience and help.

 

Edit: So I managed to change the permission of the folders and now when I execute the ls -l command all of the directories are owned by the autodl user/group, however the error is still there. I noticed when launching the irssi it's giving me a user_name of root and a nick of root. Then this error  

 

Closing link: ([email protected]) [K-Lined: Don't IRC as root!]

 

I'm out of ideas..

 

 

-v /mnt/user/Downloads/autodl:/config \ 

-v /mnt/user/appdata/binhex-rtorrentirssi:/config 

 

If that's not a copy and paste error the above lines are wrong. What the two lines above are doing is to mount two different folders from the host (/mnt/user/Downloads/autodl and /mnt/user/appdata/binhex-rtorrentirssi) to the same place in the container (/config). This does not make much sense from a file system perspective and I really don't know what docker would try to do with it, this may be the cause of your issue.

 

What you actually need is something like: 

 

-v /mnt/myuser/myrtorrentvpnfolder/data:/data \ 

-v /mnt/myuser/myrtorrentvpnfolder/config:/config 

 

Where /mnt/myuser/myrtorrentvpnfolder is a valid folder that you've created in your host. The folder above and everything bellow it should be owned by the user and group that you are passing to PUID and PGID.

 

I would suggest creating fresh folders in the host and starting over (stop and delete your container and start everything from scratch pointing to the new folders).

Edited by Cat_Seeder
Link to comment

Well, I thought I had figured out my issue, but I'm getting timeouts and webgui freezes with private tracker torrents now as well. But I did get an error message in container logs now, finally.

 

2020-02-18 18:37:07,030 DEBG 'rutorrent-script' stderr output:
2020/02/18 18:37:07 [error] 687#687: *212 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.18.0.1, server: localhost, request: "POST /RPC2 HTTP/1.1", upstream: "scgi://127.0.0.1:5000", host: "192.168.1.227:9080"

Anyone seen this one before?

Link to comment
47 minutes ago, Cat_Seeder said:

 

-v /mnt/user/Downloads/autodl:/config \ 

-v /mnt/user/appdata/binhex-rtorrentirssi:/config 

 

If that's not a copy and paste error the above lines are wrong. What the two lines above are doing is to mount two different folders from the host (/mnt/user/Downloads/autodl and /mnt/user/appdata/binhex-rtorrentirssi) to the same place in the container (/config). This does not make much sense from a file system perspective and I really don't know what docker would try to do with it, this may be the cause of your issue.

 

What you actually need is something like: 

 

-v /mnt/myuser/myrtorrentvpnfolder/data:/data \ 

-v /mnt/myuser/myrtorrentvpnfolder/config:/config 

 

Where /mnt/myuser/myrtorrentvpnfolder is a valid folder that you've created in your host. The folder above and everything bellow it should be owned by the user and group that you are passing to PUID and PGID.

 

I would suggest creating fresh folders in the host and starting over (stop and delete your container and start everything from scratch pointing to the new folders).

Ya my fault that was a copy paste error the paths are

 

-v /mnt/user/appdata/binhex-irssi:/config \

-v /mnt/user/Downloads/autodl:/data \

 

I created a new user doing "useradd -u 1002 -g 214 autodl" and assigned those to the Environment Variables deleted the perms.txt and started the container everything except for perms.txt belongs to the "autodl" user.

 

I've been trying to get this to work for a while now with no luck.. I've created new users and groups within unRAID as root and assigned the PGID/PUID to the Environment Variables with no luck I am still getting the same error. Does the PGID/PUID matter? Or can I assign any random number? Also when I docker exec into the container it says my nick and user_name is "root". I honestly have no idea what to do. I have 2 instances of rTorrent running 1 with the VPN and the 2nd one without and autodl-irssi enabled. The goal was to have this instance throw everything into a watch Folder for the main instance to Download. I would love to get it working. That being said I have to be doing something wrong so hopefully I can get it working in time. Thanks for all the help I appreciate it!

Link to comment
7 hours ago, noraa said:

Ya my fault that was a copy paste error the paths are

 

-v /mnt/user/appdata/binhex-irssi:/config \

-v /mnt/user/Downloads/autodl:/data \

 

I created a new user doing "useradd -u 1002 -g 214 autodl" and assigned those to the Environment Variables deleted the perms.txt and started the container everything except for perms.txt belongs to the "autodl" user.

Try deleting the entire contents of /mnt/user/appdata/binhex-irssi and /mnt/user/Downloads/autodl. It's a long shot but some leftovers from previous runs may be getting in the way.

Quote

I've been trying to get this to work for a while now with no luck.. I've created new users and groups within unRAID as root and assigned the PGID/PUID to the Environment Variables with no luck I am still getting the same error. Does the PGID/PUID matter? Or can I assign any random number?

PGID and PUID should be the same as the host user.

Quote

Also when I docker exec into the container it says my nick and user_name is "root".

That's ok. Docker doesn't map usernames (I.e., they don't match), all it does is to assign the host UID to the container user. For more info see: https://medium.com/@mccode/understanding-how-uid-and-gid-work-in-docker-containers-c37a01d01cf

Quote

I honestly have no idea what to do. I have 2 instances of rTorrent running 1 with the VPN and the 2nd one without and autodl-irssi enabled.

Start by simplifying your setup so that you can get acquainted with the container.

Stop both containers, remove them and prune docker system (docker system prune -af . Be warned that this command will discard all images and their related containers)

 

This time start from scratch with a single container and IRSSI enabled. 

Use fresh folders (as in, the folders in the host should be empty when you first start the container), make sure to set the right PGID and PUID on the first run and make sure that all files are created with the right permission this time. With this new single container open rutorrent and configure a single filter / tracker / IRC server (if you are not acquainted with using rutorrent autodl-irrsi plugin see https://www.rapidseedbox.com/kb/use-rutorrents-autodl-irssi-plugin for more info - do not copy your IRSSI configuration files from other containers), check if autodl-irssi has connected as expected and new files are being downloaded correctly.

Once you get to this point, if autodl-irssi is working correctly it should be easy to add your other trackers your on top of that.

Quote

That being said I have to be doing something wrong so hopefully I can get it working in time. Thanks for all the help I appreciate it!

No problem. Hopefully the above steps will help.

Edited by Cat_Seeder
Link to comment
5 hours ago, Cat_Seeder said:

Try deleting the entire contents of /mnt/user/appdata/binhex-irssi and /mnt/user/Downloads/autodl. It's a long shot but some leftovers from previous runs may be getting in the way.

PGID and PUID should be the same as the host user.

That's ok. Docker doesn't map usernames (I.e., they don't match), all it does is to assign the host UID to the container user. For more info see: https://medium.com/@mccode/understanding-how-uid-and-gid-work-in-docker-containers-c37a01d01cf

Start by simplifying your setup so that you can get acquainted with the container.

Stop both containers, remove them and prune docker system (docker system prune -af . Be warned that this command will discard all images and their related containers)

 

This time start from scratch with a single container and IRSSI enabled. 

Use fresh folders (as in, the folders in the host should be empty when you first start the container), make sure to set the right PGID and PUID on the first run and make sure that all files are created with the right permission this time. With this new single container open rutorrent and configure a single filter / tracker / IRC server (if you are not acquainted with using rutorrent autodl-irrsi plugin see https://www.rapidseedbox.com/kb/use-rutorrents-autodl-irssi-plugin for more info - do not copy your IRSSI configuration files from other containers), check if autodl-irssi has connected as expected and new files are being downloaded correctly.

Once you get to this point, if autodl-irssi is working correctly it should be easy to add your other trackers your on top of that.

No problem. Hopefully the above steps will help.

Issue is still there I am obviously doing something wrong. I've deleted the Containers and the Folders/Files that were contained in their paths. I just keep getting [K-Lined: Don't IRC as root!] I honestly don't know what to do.. I've created new users put that user in the same group as "nobody" assigned the PGID/PUID with no luck... Assigned the docker group GID with a non root user UID etc.

Link to comment
2 hours ago, noraa said:

I've created new users put that user in the same group as "nobody"

you dont HAVE to do this, it can be in any group, but thats fine if you want to add it to group 'nobody', just to be clear this is an account created on the host right?, and what is the output for the following command (again run on the host NOT the container):-

id <name of account created>

 

can you also do the following procedure:-

https://github.com/binhex/documentation/blob/master/docker/faq/help.md

Link to comment
  • binhex locked this topic
Guest
This topic is now closed to further replies.