Search:  
Gentoo Wiki

MLDonkey

Contents

Mldonkey

Mldonkey is an open source multi-network peer-to-peer application. It is also the name of the peer-to-peer overlay network that the MLdonkey uses. Originally a Linux client for the eDonkey protocol, it now runs on many flavors of Unix-like, Mac OS X, Windows and MorphOS and supports numerous peer-to-peer protocols. Development proceeds at a rapid rate, and the MLdonkey team was the second to crack the encrypted FastTrack network protocol.

--- Wikipedia

About

The purpose of this guide is to quickly show you how to set up mldonkey with Sancho as its GUI, and point you in the right direction in case you need more information on tweaking its settings.

Installation

emerge -pv net-p2p/mldonkey

You'll see the available use flags for this package. Some of them are used to enable support for additional p2p networks. Change them to fit your needs and then remove -pv from the command line to emerge the package.

After this, you will need to run the daemon this way: /etc/init.d/mldonkey start , and add it to the default runlevel: rc-update add mldonkey default. I you just need to run mldonkey with one user, you can skip this step, and launch it manually on a terminal when you are going to use it. It is just a matter of personal preference.

To do so, just launch mlnet in a terminal. Note the the mlnet daemon will stay in the background even if the terminal is closed or X dies. So, if that happens you will need to kill it to stop it.

Graphical user interfaces

There are many in portage, some people like sancho: emerge -pv net-p2p/sancho-bin

Kmldonkey is a very complete client: emerge -pv net-p2p/kmldonkey

There is no need to install a client, though. The mlnet daemon will start a light web server that you can access though http://<hostname>:4080. In most cases, that is http://localhost:4080. You can manage everything from there. A good thing about this is that you can connect using any web browser from any place you like (as long as your firewall and the mlnet daemon are configured adequately for the task.

There're other frontends for mldonkey, you can see a list at Mldonkey's website or browse the portage tree.

You will need to configure the daemon to behave as you wish. Kmldonkey and the web interface on port 4080 are quite good for this purpose. You can also edit the files in the p2p home dir by hand or even use telnet to connect to the daemon on port 4000.

Configuration

MLDonkey behavior can be altered by many user definable settings, or "options". All options are stored in .ini files located in MLdonkey startup folder. Those files also contain some comments for the options they contain.

GUIs usually provide a mean to edit a subset of the options, but as a last resort, you can use the set internal command, or even edit the options files (while the core isn't running).

-- Mldonkey Wiki

Next thing you'll need to do is make sure the proper ports are not being blocked, you might not be able to connect, or if you connect, you will get "lowid", which in turn means slower downloads.

This are my iptables rules for mldonkey:

#mldonkey
#Donkey ports
iptables -A INPUT -p TCP --dport 15052 -j ACCEPT
iptables -A INPUT -p UDP --dport 15056 -j ACCEPT
#Overnet ports
iptables -A INPUT -p TCP --dport 8740 -j ACCEPT
iptables -A INPUT -p UDP --dport 8740 -j ACCEPT
#Kademlia port
iptables -A INPUT -p TCP --dport 6956 -j ACCEPT
iptables -A INPUT -p UDP --dport 6956 -j ACCEPT
#web port
iptables -A INPUT -p TCP --dport 4080 -j ACCEPT

Those ports are completely configurable using the web interface or kmldonkey. So, make sure you take a look at yours before setting your firewall rules. 4080 is the default port for the mldonkey web server. If you want to use telnet remotely you might want to unlock 4000 as well. You might also need 4001 if you plan to connect using kmldonkey or sancho remotely.

Note, however, tha opening your firewall is not enough to be able to login remotely. You also need to set the allowed_ip_range parameter in your configuration for mldonkey. It is into downloads.ini, and you can change it though the web interface or mldonkey as well. If you want to allow access from everywhere, you can use this (again, in downloads.ini):

allowed_ips = [
 "127.0.0.1";
 "192.168.0.0-192.168.0.255";
 "0.0.0.0/0";]

If you have any doubts about which ports you need to open, you can disable your firewall, then launch your mlnet daemon. Now run this:

netstat -panA inet | grep ESTABLISHED # | grep -v $1

And see what ports are being opened by the mlnet connections. Then, you can work from there. In the web interface you can also go to Help -> Sysinfo, and you will see the list of used ports, amongst many other things. Useful information when configuring a firewall.

Once your firewall is configured, raise it again and start enjoying with your new p2p daemon.

Notes

You can add mldonkey to the 'default' runlevel if you wish, if you start the mldonkey daemon using Gentoo's rc-scripts, it'll be run under user 'p2p', you can then start Sancho and connect to the core, please note that downloaded files will be located at /home/p2p/ directory.

Upon starting Sancho for the first time, you'll be asked to configure it, it's pretty straight-forward.

Chrooting mldonkey

For the paranoid, you can chroot mldonkey and run it via webinterface, I'll not explain the procedure here, instead I will point you to a thread in the Gentoo forums where I once wrote a very simple procedure and some examples(one is for mldonkey).


Resources && References

MLdonkey-World-Wiki

MLdonkey-World-Forums

Sancho's Website

BitTorrent review

Retrieved from "http://www.gentoo-wiki.info/MLDonkey"

Last modified: Thu, 04 Sep 2008 01:19:00 +0000 Hits: 11,095