All the configuration files are located in
blocklists.listcontains a list of URL for retrieving the various block lists,
pglcmd.conf, empty by default, overrides the default settings present in
allow.p2plists 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
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"
/etc/systemd/system/my-pgl.service pasting the below to ensure that pgl only starts after all the rules have been properly set up. This example should work for any iptables firewall (ufw, shorewall, etc.):
[Unit] Description=PeerGuardian Linux - an IP Blocker After=iptables.service [Service] BusName=org.netfilter.pgl ExecStart=/usr/bin/pglcmd start ExecStop=/usr/bin/pglcmd stop PIDFile=/run/pgld.pid [Install] WantedBy=multi-user.target
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
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