User Tools

Site Tools


doc:appunti:software:mldonkey_config

Configuring MLdonkey

Joining P2P networks with MLdonkey through a firewall

Generally speaking, partecipating to a P2P network requires that your host is reachable on one or more TCP or UDP ports by other peers. If your host is directly connected to the Internet (it has a public IP address) you must check that no firewalls are blocking incoming traffic. The firewall can be on the router connecting to the Internet or can be on the host itself. The latter is the case of a Linux box running MLdonkey and with netfilter (iptables) enabled.

If your host is behind a router doing NAT (the host has a private IP address), you must ensure that traffic arriving to the incoming ports of the router will be forwarded to the host running the P2P program.

MLdonkey can partecipate to several P2P networks, each of them have some requirements about ports that should be opened or forwarded. Several ports are well-known but can be changed by the user. Here I try to summarize the ports used by the various networks, their historical default values, the default values proposed by MLdonkey and the configuration file where you can change them.

If you want MLdonkey to partecipate only to some P2P networks, you can open only the relevant ports. I focus the discussion about incoming traffic, where firewalls generally block packets. I assume that there are no restrictions on outgoing connections and that the firewall eventually performs connection tracking, allowing incoming traffic related to outgoing connections.

Incoming connections

Network Type Historical default MLdonkey default Configuration file
eDonkey2000 TCP 4662 port = 4662 donkey.ini
eDonkey2000 UDP 4672 (eMule) port + 4 = 4666 donkey.ini
Overnet TCP 4662 overnet_port = random donkey_expert.ini
Overnet UDP No default overnet_port = random donkey_expert.ini
Gnutella TCP 6346 client_port = 6346 gnutella.ini
Gnutella2 TCP No default client_port = 6346 gnutella.ini
Gnutella2 UDP Same of TCP client_port = 6346 gnutella.ini
BitTorrent TCP 6881 client_port = 6882 bittorrent.ini
Fasttrack TCP 1214 client_port = 1214 fasttrack.ini
OpenNap TCP 6699 client_port = 9999 opennap.ini
Direct Connect TCP 1412 client_port = 4444 directconnect.ini
Direct Connect UDP Same of TCP client_port = 4444 directconnect.ini
Soulseek TCP 2234 client_port = 2234 soulseek.ini

Notes about P2P networks

eDonkey2000

The eDonkey network http://www.edonkey2000.com/ is a network specialized in sharing really big files (between 0 to 1.4 GB). Uses the same great download system as Overnet but relies on central servers to search for files.

  • Files can be downloaded from different sources at the same time.
  • Files are identified by uniq identifiers (MD4) that can be used to find new sources for a file.
  • Files are checked using checksums, and chunks (9MB) that are corrupted are downloaded again.
  • Files chunks can be downloaded in any order.
  • Files are shared as soon as a checked chunk has been downloaded, to speed up the spreading of files.
  • Need some servers to be known, mldonkey can use servers.ini file that is in the distribution.

Ports can be configured freely, those are the defaults:

  • TCP port 4662 client to client exchange.
  • UDP port 4672 for clients, where to listen for source asking.
  • TCP port 4661 for servers, it is the default port to listen.
  • UDP port 4665 for servers, it is 4661 + 4, where to listen for source asking requests.

Overnet

Overnet is a network using the same download protocol as edonkey, but a different search/localisation protocol , that doesn't need servers. http://www.overnet.com/. It needs a (recent) list of Overnet peers that you can connect to. For that, you can use the servers.ini file from the most recent distribution of mldonkey. It contains a long list of Overnet peers. It can run over any port. The defaults it uses are:

  • TCP port 4662 to connect to other clients.
  • The UDP port used for searching and publishing has no default.

Gnutella

NOTE: From release 2.9.0 on, support for Gnutella and G2 are no longer compiled in by default as both plugins are buggy and currently unmaintained.

A peers on a Gnutella network http://www.gnutella.com/ is referred to as a servent - it is both client and server to the network, allowing the user to both serve files to other Gnutella network members and to receive files from those members. Gnutella peers generally can run over any port, the default is

  • TCP port 6346

Gnutella2

NOTE: From release 2.9.0 on, support for Gnutella and G2 are no longer compiled in by default as both plugins are buggy and currently unmaintained.

Gnutella2 was created by Shareaza to solve legacy Gnutella's problems, replacing the aging and underperforming “G1” with a fresh and innovative platform designed to grow. Gnutella2 is an architecture designed from the ground up to be extensible, and includes a range of new technologies to lift performance beyond traditional expectations of a distributed system. Gnutella2 is a fresh start.

Many problems have been identified with the legacy Gnutella network. For example there is ample research indicating that it cannot scale or that it uses too much overhead. But perhaps more importantly it lacks a clear set of network standards, which has led to a network of unequal clients and abusive behaviour, to the point that one client can consume 80% of the resources on the entire network!

  • TCP port, no default
  • UDP port, the same number of TCP port

BitTorrent

BitTorrent doesn't look like other P2P networks: it uses peer-to-peer file sharing mechanisms to help release huge files without the hassle and price of setting up big links, big servers, and mirrors (or in addition to that expensive approach).

It divides shared data (a single file or a directory) into pieces, typically of 256 KiB. A SHA-1 checksum is computed for each piece, and used to check the piece has been correctly downloaded. The checksums are stored in a .torrent file, along with filenames. The .torrent file also nominates a tracker, a Web resource that introduces peers to each other. Peers contact each other, learn what pieces they have available, request the rarest (least commonly seen) pieces first, and send requested pieces.

To start a Torrent download with MLdonkey, locate the URL of a torrent file and use the dllink <URL> command or the DL button from the web interface. Remember to activate BitTorrent protocol, disabled per default in MLdonkey.

Another way to start a torrent download, is to copy the torrent file into the mldonkey/torrents/incoming/ directory; MLdonkey will scan that directory for new files and move the torrent file into mldonkey/torrents/downloads/, eventually renaming it with the proper filename. Once the file is downloaded, the torrent file will be removed from the directory (so, if you want to keep the torrent file, make a copy of it).

Design and protocol are described on the main site http://bitconjurer.org/BitTorrent/.

  • TCP port 6881

Fasttrack

FastTrack is a protocol similar to the eDonkey2000 protocol, but it cannot download from users who do not have the complete file. The protocol was used by KaZaa and Morpheus, later the Sharman Networks bought rights and monopolised FastTrack protocol.

FastTrack users with the fastest Internet connections and the most powerful computers are automatically designated as Supernodes. A Supernode contains a list of some of the files made available by other users and where they are located. When you perform a search, your computer first searches the nearest Supernode to you, and then sends you immediate results. This first Supernode then refers your search to other Supernodes and so on.

  • TCP port 1214 is where clients and supernodes listen.

OpenNap

OpenNap http://opennap.sourceforge.net/ is an open souce implementaion of the Napster client/server protocol. The sharing is based on a central server that provides the ability to search for particular files and initiate a direct transfer between the clients. In addition, chat forums similar to IRC are available. There are a few OpenNap networks which are interconnected to allow searching and downloading files from within each OpenNap network without connecting to all of its servers. The problem is that each network is not connected, thus requiering mulitple server connections for a larger file selection. Napster was originally ment for sharing MP3s only, but OpenNap is expanded to allow any file to be shared.

Only an open TCP port is required on the client, servers listen on several ports.

  • TCP port 6699 where the client receives PUTs from peers.
  • TCP port 8888 default port for servers.
  • TCP port 8875 for metaserver
  • TCP port 8889 where the OpenNap server listen for the stats

Direct Connect

Direct Connect is a file sharing protocol based on servers (called hubs) run by volunteers. Thus you only share your files with the people connected to the same hubs as you are. The people running hubs usually set up lots of rules about who can connect to their hub, for example a minimum amount of shared files, open slots for connections, ban some material (eg. child pornography) etc. This is good because is gets rid of a lot of leechers. (people who just download, don't share).

Near zero documentation on the home page http://www.neo-modus.com/, just some advertise: Direct Connect offers a community-oriented, open, user-controlled network. Direct Connect's network architecture is built on a peer-to-peer foundation; users run, control, and maintain the network. Users are able to share any type of file. These files are easily viewed through a familiar organized windows-explorer interface.

More info can be bought from programs compatible with the Direct Connect protocol, as http://dcplusplus.sourceforge.net/. It seems that a TCP and an UDP port are required, the defaults are:

  • TCP port 1412
  • UDP port same as TCP port.

Soulseek

The Soulseek Network http://www.slsknet.org/ is a network similar to Napster. You connect on a single server, and there, you can search for (mainly audio) files, you can join rooms to chat with other users, and you can browse other users files. There is only one server on Soulseek, and the one you have in soulseek.ini is probably not up-to-date. Documentation about the protocol used by this P2P network is scarce. The FAQ only mentions two used ports, the French FAQ adds that they are TCP ports. I will not spend time looking at a so poorly documented thing.

  • TCP port 2234
  • TCP port 5534
doc/appunti/software/mldonkey_config.txt · Last modified: 2021/09/19 18:52 by niccolo