Update 18-07-2012:
Added details on debugging MLDonkey, namely /var/log/mldonkey.
Added explanation of telnet authentication.
MLDonkey is an open source, free software multi-network peer-to-peer application. Currently the following protocols are supported: eDonkey, Overnet, Bittorrent, Gnutella, Gnutella2, Fasttrack, FileTP and Kademlia.
I wanted to put my 266 Mhz Celeron to good use so I've decided to install MLDonkey without X11 support leaving only the core with both telnet and web interfaces.
Bellow are the steps needed to install MLDonkey on FreeBSD 7.0:
- % su
- # cd /usr/ports/net-p2p/mldonkey
- # make WITHOUT_GUI=yes WITHOUT_X11="YES" WITHOUT_TK="YES" install clean
- # rehash
Now that MLDonkey is installed let's activate it at boot time:
- # echo 'mlnet_enable="YES"' >> /etc/rc.conf
- # echo 'mlnet_user="p2p"' >> /etc/rc.conf
- # echo 'mlnet_logfile="/var/log/mldonkey"' >> /etc/rc.conf
- # touch /var/log/mldonkey
- # chown p2p:p2p /var/log/mldonkey
Notice the
mlnet_user option, for added security we'll create a p2p user:
- # pw user add p2p
- # mkdir /home/p2p
- # chown p2p:p2p /home/p2p
Restart the system for the changes to apply.
Now we are going to modify the MLDonkey configuration
:
- % su
- # /usr/local/etc/rc.d/mlnet status
- # exit
- % telnet 127.0.0.1 4000
- > auth admin ""
- > passwd newpassword
- > set allowed_ips "127.0.0.1 192.168.1.0/24"
- > save
- > exit
Basically, we've checked to see if MLDonkey was running and accessed it through its telnet interface. Initially the application is configured without an admin password, so step 6 takes care of that. On step 7 we set the ips that are allowed to connect to the application, in the example the localhost and all clients in the local network.
In the future to authenticate through telnet:
- % telnet 127.0.0.1 4000
- > auth admin "mypasssword"
Replace
mypassword with your own but keep it under "".
MLDonkey's web server can be accessed on
http://localhost:4080, so fire-up your browser and point to the address. If your planning to access the server from another computer replace
localhost bit by the server's ip or hostname.
The following are a few useful commands that can be passed on to MLDonkey:
- # /usr/local/etc/rc.d/mlnet start
- # /usr/local/etc/rc.d/mlnet stop
- # /usr/local/etc/rc.d/mlnet restart
- # /usr/local/etc/rc.d/mlnet status
If you come across any problems such as MLDonkey not starting check /var/log/mldonkey as this is file golden in debugging issues.
There are tons of configuration options available both in the telnet and web interfaces so I've opted to mention only the basic stuff. For more information I suggest browsing the project's website at http://mldonkey.sourceforge.net/.