PeerGuardian Linux

From ArchWiki
Revision as of 16:24, 19 January 2013 by Gilrain (Talk | contribs) (Firewall: always prefer .include, RTFM & iptables.service is not touched by ufw, shorewall, etc.)

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"


Create /etc/systemd/system/pgl.service pasting the following to ensure that pgl only starts after all the rules have been properly set up. This example must be adapted to work with other firewalls (ufw, shorewall, etc.):

.include /usr/lib/systemd/system/pgl.service



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