Archive for May 11th, 2013

Raspberry Pi :: PeerGuardian / Moblock setup

While thinking about connecting the new Raspberry Pi board to the internet, I could not even imagine to do that without any firewalls or filters for incoming traffic. Having a little bit of experience with MoBlock before, I have decided to try the same approach with Raspberry Pi.

Unfortunately, the “moblock” package is not in the official repositories, so I had to build one from the sources. The process is quite easy, but requires a few not very obvious steps.

First, add the repository and get the sources. The following goes into the /etc/apt/sources.list:

deb-src wheezy main

then install the GPG keys:

gpg –keyserver –recv-keys C0145138
gpg –export –armor C0145138 | sudo apt-key add -

and finally get the sources:

sudo apt-get update
sudo apt-get install fakeroot
sudo apt-get build-dep -y pgl
mkdir ~/peerguardian
cd ~/peerguardian
apt-get source pgl

The build dependecies in the previous step include some X11 and qt4 stuff, which might be required if you run a desktop environment or not, if you run a headless installation, in which case you may free about 65MB (WARNING: you’ll lose your desktop doing this!) using:

sudo apt-get remove x11-common
sudo apt-get autoremove

The build step is very simple:

sudo make install

or you may want to replace “./configure” with “./configure –without-qt4 –disable-dbus” in case of headless installation.

Finally, start the PeerGuardian daemon (the first run might take a while, since it’s downloading and unpacking all block lists):

sudo pglcmd start &
tail -f /usr/local/var/log/pgl/pglcmd.log

One last word of warning, the default block list is so strict, it might even disable the blocklist updates and downloads. Don’t be surprised, if you need to issue “sudo pglcmd stop” before being able to download new block lists.

And if everything works fine, you may enable automatic daemon startup using:

update-rc.d pgl defaults


No Comments