PeerGuardian Linux

From ArchWiki
Revision as of 14:14, 19 January 2013 by Graysky (talk | contribs) (Firewall)
Jump to: navigation, search

Template:Article summary start Template:Article summary text Template:Article summary end


There are two AUR packages to choose from: pgl-cli includes only the daemon and CLI tools, while pgl comes complete with a GUI (written using Qt).


All the configuration files are located in /etc/pgl:

  • blocklists.list contains a list of URL for retrieving the various block lists,
  • pglcmd.conf, empty by default, overrides the default settings present in /usr/lib/pgl/pglcmd.defaults,
  • allow.p2p lists custom IP ranges that will not be filtered.

The default lists in /etc/pgl/blocklists.list block many potentially legitimate IP address. Users are encouraged to exercise best judgment and the information available at I-Blocklist.

It is recommended to disable the filtering of HTTP connections by adding the following to /etc/pgl/pglcmd.conf:

WHITE_TCP_OUT="http https"

Some program might not be able to reach the outside world. For instance, users of MSN for instant messaging, will need to add port 1863 to the white list:

WHITE_TCP_OUT="http https msnp"

Conversely, onecould white list all the ports except the ones used by the program to be blocked. The following example only use the block lists to stop incoming traffic on ports 53 (DNS) and 80 (HTTP):

WHITE_TCP_IN="0:79 81:65535"
WHITE_UDP_IN="0:52 54:65535"


It is best to start pgl after an iptables based firewall. Users should create an override for pgl.service by creating /etc/systemd/system/my-pgl.service and adding a "Requires=" argument. This will ensure that pgl only starts after all the rules have been properly set up.

Here is an example when using the Uncomplicated Firewall:


Description=PeerGuardian Linux - an IP Blocker
Requires=ufw.service ufw.service

ExecStart=/usr/bin/pglcmd start
ExecStop=/usr/bin/pglcmd stop



By default, pgl blocks traffic on the local IPv4 addresses. To disable this behavior, edit /etc/pgl/pglcmd.conf to add an exception using the WHITE_IP_* setting:


For further information, please refer to the # Whitelist IPs # section of /usr/lib/pgl/pglcmd.defaults.

Starting up

Once comfortable with the configuration of both the daemon and lists, type in:

# systemctl start pgl.service

To make sure that pgl works as intended, issue this command:

# pglcmd test

To start pgl automatically, use the following syntax to activate it:

# systemctl enable pgl.service