Peer Guardian on Raspberry Pi

  

This tutorial will show how to compile and install Peer Guardian on a Raspberry Pi.  The process requires the at least the 2012-06-18-wheezy-beta.zip or newer Debian image (or manual kernel re-compilation).  This will NOT work with debian6-19-04-2012.zip since the kernel does not have net filtering enabled. Also, you will need a decent sized SD card (4GB at least) … the dependencies alone require 382 MB.

First, install the required package dependencies. In a terminal on the Raspberry Pi:

sudo apt-get install libnetfilter-queue-dev lsb-qt4 libdbus-1-dev qt4-dev-tools libdbus-1-dev libdbus-glib-1-dev firehol firestarter ufw zlib1g-dev

Next, download and extract the Peer Guardian source archive, then change directory to the root of the tree:

wget http://downloads.sourceforge.net/project/peerguardian/PeerGuardian%20Linux/2.1.3/pgl-2.1.3.tar.gz

tar -xvf pgl-2.1.3.tar.gz

cd pgl-2.1.3/

Now we are finally ready to start the build! To compile, run make, then install Peer Guardian with make install:

make

sudo make install

Finally,

sudo /usr/lib/lsb/install_initd /etc/init.d/pgl

Now reboot the Pi:

sudo reboot

And on start-up you will see the confirmation that it starts:

Starting PeerGuardian Linux: pgld.

Note: this takes much longer than usual for the first boot, be patient!

To start the GUI from the LXDE menu, select Internet -> pgl-gui

The default settings are very strict and you will likely want to change them.  It even blocks access to the apt sources, so until you changes the settings, even ‘apt-get update’ will fail.

 

7 Comments

  1. I wanted to point out, that it’s possible to compile pgld 2.2.1 without installing qt4 (gui stuff, setting sysconf dir is recommended) first run “./autogen.sh” then “./configure –without-qt4 –sysconfdir=/etc” – “make” – “make install”…. then according to /usr/var/log/pgl/pgld.log I had trouble with “Cannot initialize D-Bus …. org.netfilter.pgl” due to security policies in the configuration file.” – to fix this issue copy /usr/local/etc/dbus-1/system.d/org.netfilter.pgl.conf to /etc/dbus-1/system.d/ (cp /usr/local/etc/dbus-1/system.d/org.netfilter.pgl.conf /etc/dbus-1/system.d/).

    • Thanks for the tip Michael! The GUI is overkill and unnecessary for most applications I’ve run so far anyway!

  2. When i turn on peerguardian, i see “failed executing command(s). the following output was given:
    ” ”
    You can also check /var/log/pgl/pgld.log or /var/log/pgl/pglcmd.log” for more detail”

    what does it mean?

    • Hmmm… not a very useful error message. What is the output of the two files that Peer Guardian suggests to check for more detail?

  3. hi,
    any idea what these errors mean

    pi@raspberrypi ~/pgl-2.2.2 $ make
    make: *** No targets specified and no makefile found. Stop.
    pi@raspberrypi ~/pgl-2.2.2 $ make install
    make: *** No rule to make target `install’. Stop.

    thanks

    • First run “./autogen.sh” then “./configure –without-qt4 –sysconfdir=/etc”
      THEN “make”and then “make install”

      • I got got errors running those commands too.
        pi@raspberrypi ~/pgl-2.2.2 $ ./autogen.sh
        ./autogen.sh: 3: ./autogen.sh: aclocal: not found
        pi@raspberrypi ~/pgl-2.2.2 $ ./configure –without-qt4 –sysconfdir=/etc
        configure: WARNING: you should use –build, –host, –target
        configure: WARNING: invalid host type: –without-qt4
        configure: error: invalid variable name: `–sysconfdir’

        I installed all the suggested dependencies except the two with qt4 in their name into a new non gui installation of Raspbian that only has xbmc and mpd installed on it.

Trackbacks/Pingbacks

  1. RaspberryPI Torrent station Test | MM Team - [...] Per rendere più sicure le connessioni ho aggiunto peer guardian linux ora alla verisone 2.2.2, e dato che non …

Leave a Reply