I'm running rtorrent on a seedbox, but this seedbox has significant bandwidth restrictions. I have another server (I'll call it the proxy) with no bandwidth restrictions which I'd like to use as a proxy when leechers are connecting to my box (the connection between the seedbox and the proxy has no bandwidth restrictions).

There are a few ways I could see this working out, but I'm not sure on the details (mainly I'm unsure of how to coax rtorrent into doing what I want):

  • ssh from the seedbox into the proxy, reverse forwarding the incoming connections port to localhost. The problem is: how do I get rtorrent to tell peers that they should connect to the proxy and not to the seedbox directly?

  • ssh from the seedbox into the proxy, set up a SOCKS tunnel, and wrap all rtorrent traffic in the tunnel. This is feasible, but I'd like to avoid the hackiness of force-tunneling rtorrent connections without rtorrent knowing what's going on (per this answer, I'd likely have to do it without rtorrent's knowledge).

Any ideas?

  • How much control do you have over the "proxy" box? – slm Feb 12 '14 at 21:28
  • I'm root on both boxes. – joshlf Feb 13 '14 at 2:03
  • Does it have to be rtorrent or would you be willing to use transmission instead? I use transmission and simply redirect a port on my firewall to a system behind it. – slm Feb 13 '14 at 2:42
  • 1
    Yeah, it's gotta be rtorrent. – joshlf Feb 13 '14 at 2:43

Since you have root access to the proxy box I guess I would recommend redirecting 1 or more ports directly to the seedbox. I would then pin rtorrent so that it was either running on 1 or more of these identical ports. Looking at the ArchLinux Wiki page on RTorrent it seems you'd be able to configure rtorrent so that it only used 1 or a few of these same ports.

port_range = 49164-49164

You'll also likely want to open the DHT port:

dht = auto
dht_port = 6881
peer_exchange = yes

But of the options presented, this seems the cleanest to me and would require the least amount of effort to configure/setup.

  • So this is one of the approaches I considered, but the problem remains: how do I get rtorrent to report to the tracker that it can be reached at the proxy's IP address, rather than at the seedbox's IP address (which is the box that it's running on)? – joshlf Feb 13 '14 at 6:15
  • The IP address reported to the torrent tracker is irrelevant. The torrent tracker will detect the ip address that you are connecting from, even if you report a different IP. When your client downloads the peer list, your client connects directly to the peers. The tracker, beyond serving you a list of who has what, is out of the loop so to speak. You can actually amend the source code of a torrent client to announce words instead of numbers for an ip address and it will have no effect on your ability to connect to peers or the reporting of your stats. – J363 Jun 17 '16 at 6:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.