Setting the port that rutorrent listens on?

peshua19

Member
May 25, 2018
897
0
16
Greetings

I'm very much an rtorrent/rutorrent n00b, and I am currently in the process of moving from Azureus to rtorrent/rutorrent. Azureus and rtorrent/rutorrent are on two different machines on my LAN. I used this guide to install rtorrent and rutorrent on an Ubuntu 9.10 machine:

http://chogie.info/?p=3

Everything seems to work well.

I use the Azureus html webui to control Az remotely. I have set in the Az preferences for the webui to listen on, say, port 60154. Then I have that port forwarded in my router to the LAN IP address of the machine that runs Azureus. I can control Azureus from anywhere by going to

http://<my IP address>:60154

in a web browser. Works great.

A similar approach works on the LAN with rutorrent

http://<LAN IP address of rtorrent/rutorrent machine>/rutorrent

but how do I set the port so I can get to it from the internet?

Thank you!
 

saroos1

Member
May 25, 2018
718
0
16
with rutorrent you have only 3 ports to worry about ever

the port rutorrent is on depends on your webserver, this is normally 80 for http and 443 for https

the port rtorrent listens on is defined in .rtorrent.rc it can be a single port or a range. It looks like this:


port_range = 51001-51001



and the only other port you need to worry about is the scgi port. This is set in 2-3 locations....it is in .rtorrent.rc, rutorrent's config files at rutorrent/conf/config.php and in your webserver's config.

in .rtorrent.rc it looks like this:


scgi_port = 127.0.0.1:5001


in the webserver, it depends on the webserver..

in rutorrent's config files it looks like this:


$scgi_port = 5001;
$scgi_host = "127.0.0.1";
 

peshua19

Member
May 25, 2018
897
0
16
Quote

the port rutorrent is on depends on your webserver, this is normally 80 for http and 443 for https


OK - that's kind of what I figured. So I'd have to forward port 80 through my router to the machine that rtorrent/rutorrent is running on if I use plain http. Hmmm... Port 80 is already forwarded to my son's xbox360, so that's out.

No big deal, though, because really all I need to be able to do with rtorrent from "out on the internet" I can do with screen, ssh, and scp.

Or is there a way to make rutorrent listen on, say, port 52147?

Thank you for your help! smiley.gif
 

Attachments

saroos1

Member
May 25, 2018
718
0
16
you can forward any port you want.


It's even possible to set up something like "pound" to send the right items to the right location depending on the headers...

but for what you need, your best option would be to forward some nonstandard port on your internet facing side to port 80 on the machine running rutorrent.


or you could just set up your webserver to use any port you like...without much more info i can't help you.


info i need:

type of router

which webserver are you running


internal ip.




basically what you need to do is either:


forward internet facing port X to local area ip Y port 80 where X =the port you want to use and Y = the ip running rutorrent on your LAN


or:

set the webserver on the machine running rutorrent to listen on whatever port you lik eand forward all incoming traffic across that port to that machine.
 

peshua19

Member
May 25, 2018
897
0
16
Quote

but for what you need, your best option would be to forward some nonstandard port on your internet facing side to port 80 on the machine running rutorrent.


That makes sense. I hadn't thought of that. smiley.gif

The router is an old Linksys WRT54G running Sveasoft Alchemy-V1.0 v3.37.6.8sv firmware.

The machine running rutorrent is on LAN IP address 192.168.1.125

I want to access rutorrent from the internet on port 55671 (e.g.)

Then I would just set it up on the port forwarding page of the router's webui to forward incoming traffic on port 55671 to 192.168.1.125:80. Is that right? I've never tried forwarding a port where internet-facing port A is forwarded to port B where A is not the same port number as B. But I guess it'll work.

Edit: Nope - I tried that. It won't let me enter 192.168.1.125:80 into the IP address field. Ah well.

BTW, the webserver is Apache.
 

Attachments

lisas4567

Member
May 25, 2018
773
0
16
Open apache.conf (Or http.conf)

Find this line:
Listen 80

change it to:
Listen 55671

Restart apache, and now forward port in the firewall.
 

peshua19

Member
May 25, 2018
897
0
16
Quote
Open apache.conf (Or http.conf)

Find this line:
Listen 80

change it to:
Listen 55671

Restart apache, and now forward port in the firewall.​



Here's what I figured out:

In /etc/apache2/ports.conf, I did these edits:

NameVirtualHost *:55671
Listen 55671

and in /etc/apache2/sites-enabled/000-default I did this edit:

<VirtualHost *:55671>

I restarted the webserver, forwarded port 55671 to the rtorrent/rutorrent machine, and now I can connect to rutorrent by

http://<my_internet_IP_address>:55671/rutorrent

Thank you all for your help! smiley.gif
 

Attachments