Koozali.org: home of the SME Server

SME v7.0 and bit torrents

Offline Teviot

  • *
  • 610
  • +0/-0
SME v7.0 and bit torrents
« on: August 03, 2006, 12:11:35 PM »
I have recently become interested in bit torrents. After a bit of searching i don't seem to be able to find much relating to SME v7.0

Can anyone help?  I will need assistance to set it up on my SME Server too.

Adrian
Regards
M0GLJ
......................................................
I am new to SAIL SME Server v8b6 and have been using SME for many years.
I have already done some research and only ask questions if I still can't work it out.

Offline Curly

  • ****
  • 114
  • +0/-0
SME v7.0 and bit torrents
« Reply #1 on: August 04, 2006, 12:17:42 PM »
I use Torrentflux (http://www.torrentflux.com) installed in a seperate ibay on SME-server 7. I just followed the normal install, no problems.

I have used the standard bittorrent-scripts, but then you will have to download using command-line, you will have less control if you use that kind of clients.
.......................................

asgard

SME v7.0 and bit torrents
« Reply #2 on: August 04, 2006, 02:29:39 PM »
Can you write somekind of tutorial how did you install on sme ?

Offline Curly

  • ****
  • 114
  • +0/-0
Installation
« Reply #3 on: August 05, 2006, 02:55:04 PM »
I did this:
    1) created an ibay using the server-manager, execution of dynamic content = on

    2) downloaded torrentflux 2.1 final

    3) followed the install instructions (untar in html directory of new created ibay, create database, edit config.php to include database user and password)

    4) I might have changed the owner of all the files to www after install (in html directory):
Code: [Select]
chown -R www:www *, especialy the download directory.[/list]

The only thing I'm not sure of, is wether a torrent-download keeps running when rotate-log switches logfiles. In my previous install of SME-server (6.0), the download stopped because the httpd process was stopped. I do not know wether this still happens with version 7.

When you install on version 6.0, you will have to change the path to python in the first line of some python scripts from #!/usr/bin/env python to #!/usr/bin/python2, in version 7.0 this is not the case.
.......................................

slav

SME v7.0 and bit torrents
« Reply #4 on: August 14, 2006, 10:58:42 PM »
Hello Curly,
  I installed torrentflux as you described, but I have some problems. The setting in the i-bay account are:
    Group: Everyone
    User access via file sharing or user ftp: Write=group, Read=everyone
    Public access via web or anonymous ftp: Entire Internet (no password required)
    Execution of dynamic content (CGI, PHP, SSI): Enabled

I am using SME Server to share my Internet connection at home.
  1. When I upload a torrent file I see the message "Connecting to Peers" and no activity. When I load the same torrent file into BitComet on my Windows machine, which is in the local network, it starts downloading it. Then I see that TorrentFlux is downloading from my Windows machine.
  2. I configured portforwarding on SME server to forward the ports that TorrentFlux is using from the external network to localhost. Then TorrentFlux works fine.

  It seems that TorrentFlux works with the dedicated ports on localhost interface. Can anyone tell me how to set it to use the external ports? Or probably SME Server has to be configured somehow?

Offline Curly

  • ****
  • 114
  • +0/-0
SME v7.0 and bit torrents
« Reply #5 on: August 15, 2006, 09:32:35 AM »
The FAQ http://no.longer.valid/phpwiki/index.php/SME7FAQs contains a subject about port-opening. It's called "How do I allow public access to a service I've added to SME7?". That should do the trick. You should open a port for every concurrent torrent you would want to run, so to be able to download 3 torrents at the same time, you should have 3 ports opened.

Opening ports makes you 'connectable'.
.......................................

slav

SME v7.0 and bit torrents
« Reply #6 on: August 16, 2006, 10:35:17 PM »
Curly, thank you for this info. I created public acces for python for the necessary ports, but it doesn't work. It seems that BitTornado is using only the default bind (and seems it is localhost on my server) and I can't find a way to put it work on the external network.

Offline Curly

  • ****
  • 114
  • +0/-0
SME v7.0 and bit torrents
« Reply #7 on: August 17, 2006, 12:31:11 PM »
To debug your problem, you could check where Bittornado is listening:

Code: [Select]
netstat -an |grep -i listen

Should give you a list of ports being listened upon. When you're running a torrent, that port should be there:

Code: [Select]
tcp        0      0 0.0.0.0:13019               0.0.0.0:*                   LISTEN

In this sample, the port is 13019, the interface is 0.0.0.0, which means every interface.

If your output is the same, it's a firewall problem. If not, its what you describe.

-- edit --
Firewall check:
Code: [Select]
iptables -L -n|grep 13019
should give something like
Code: [Select]
ACCEPT     tcp  --  0.0.0.0/0            123.123.123.123      tcp dpt:13019
denylog    tcp  --  0.0.0.0/0            123.123.123.123      tcp dpt:13019

Where 123.123.123.123 would be your external ip-address
.......................................