Monday, March 30, 2009

Download safely with MoBlock

There are many less than friendly sources out there on the Internet that want to establish connections with your computer so they can do less than friendly things. These connections could take place while using your web browser, but more often they occur when you try to download content via peer-to-peer networks. These less than friendly sources could be spammers or government organizations or they could be agents of the RIAA looking to report people for downloading and sharing copyrighted material illegally online.

Phoenix Labs is an online community that has released software that utilizes block lists that are updated frequently to prevent connections to these unfriendly sources. They put out a very nice GUI application for Windows called PeerGuardian2. They do not have an official Linux client that performs this duty, but there is a project called MoBlock which does perform the same function and is in the process of becoming the official Linux PeerGuardian client. For those of you running a Debian based distribution, packages are available through moblock-deb.

To start, add these lines to your "/etc/apt/sources.list" file:
deb intrepid main
deb-src intrepid main
Note: This assumes you are running Ubuntu 8.10 (Intrepid Ibex). If you are running a different version of Ubuntu or are running Debian, check their website for the appropriate entries. They tend to drop support for outdated versions of Ubuntu so you may have to do a bit of digging to find the appropriate mirror listed on their site. Or you could upgrade to a newer version, of course.

Next, run these commands, in order, at the Terminal:
gpg --keyserver --recv 9072870B
gpg --export --armor 9072870B | sudo apt-key add -
sudo aptitude update
sudo aptitude install moblock
The first two lines import the necessary keys to verify the digital signatures of the packages. The next line updates the list of available packages. The last line will install MoBlock. The installation process is not as simple and straightforward as most, but its not terribly complicated. I just selected the default values for all of the options, which is fine unless you are looking for a really fancy setup. The daemon is controlled through an interface called blockcontrol and all commands must be run as root.

To start the daemon:
sudo blockcontrol start
To stop the daemon:
sudo blockcontrol stop
To restart the daemon:
sudo blockcontrol restart
To update the blocklist:
sudo blockcontrol update
To view the settings and status of the daemon:
sudo blockcontrol status
To check if the daemon is doing its job:
sudo blockcontrol test
The daemon will load upon system startup and the blocklists get updated daily on their own. For further details, check out the project page at There is also a GUI application available called mobloquer. You can download it by typing:
sudo aptitude install mobloquer
Since I'm running a headless server without a GUI you're on your own for figuring out how it works if you want a GUI. There are other GUIs available that work with MoBlock called MoBlockGUI and EasyBlock Interface that you could also try out if you are so inclined.

Obligatory disclaimer:
There are many uses for P2P networks, both legal and illegal. One of the best ways to obtain installation media for Linux distributions is by using BitTorrent, which is completely legal. I do not endorse or encourage the downloading of copyright or otherwise illegal content. If you choose to download such material you do so at your own risk and I will not be held responsible in any way for your actions.

No comments:

Post a Comment