Archive for June, 2016

Install PeerGuardian on Ubuntu without a GUI (For Servers)

Wednesday, June 8th, 2016

Installing PeerGuardian on an Ubuntu Server w/out GUI

Install prereqs:

sudo apt-get install libdbus-1-dev zlib1g-dev iptables libnetfilter-queue-dev libnfnetlink-dev g++

Download and unzip PGL Source:

cd ~/Downloads
wget -N "http://downloads.sourceforge.net/project/peerguardian/PeerGuardian%20Linux/2.3.1/pgl-2.3.1.tar.gz" -O "pgl.tar.gz"
tar -zxvf pgl.tar.gz
cd pgl-2.3.1

 

For Ubuntu 12.04 and Older:

wget -N "http://downloads.sourceforge.net/project/peerguardian/PeerGuardian%20Linux/2.2.4/pgl-2.2.4.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fpeerguardian%2Ffiles%2FPeerGuardian%2520Linux%2F2.2.4%2F&ts=1465430792&use_mirror=heanet" -O pgl.tar.gz
tar -zxvf pgl.tar.gz
cd pgl-2.2.4

Configure PGL for Non GUI:

./configure --sysconfdir=/etc --localstatedir=/var --without-qt4 --disable-dbus --enable-lowmem --with-lsb=/lib/lsb/init-functions

 

For Ubuntu 16.04+:

./configure --sysconfdir=/etc --localstatedir=/var --without-qt4 --disable-dbus --enable-lowmem --with-systemd

Install It:

make
sudo make install

Set it to start on boot:

sudo update-rc.d pgl defaults

Set it to start on boot for Ubuntu 16.04+:

sudo systemctl enable pgl

Edit the blocklists file with entries from iblocklist.com:

sudo nano /etc/pgl/blocklists.list

Update the lists:

sudo pglcmd update

Restart pglcmd:

sudo pglcmd restart

Restart the service:

sudo service pgl restart

Boom, you’re done!