PeerGuardian is a free, open source, IP address blocking software programs capable of blocking incoming and outgoing addresses. The application uses
a blocklist of IP addresses to filter the computers of several organisations. The system is also capable of blocking advertising, spyware and government upon user preferences.
Installation
Go to sourceforge.net and download the file peerguardnf-1.5beta.i386.deb. Install it using
sudo dpkg -i peerguardnf-1.5beta.i386.deb
Now, create the directory /etc/peerguardian. This is where the list of blocked hosts will be stored
sudo
mkdir /etc/peerguardian
Next, open the file /usr/local/bin/peerguardian.sh with your favorite text editor
sudo
vim /usr/local/bin/peerguardian.sh
Download the code , Paste the code into the file and save it:
Now, make it executable by running
sudo chmod -c 755 /usr/local/bin/peerguardian.sh
Using Peerguardian
To start Peerguardian run
sudo peerguardian.sh start
Stopping it goes as
sudo peerguardian.sh stop
To update the blocking lists run
sudo peerguardian.sh restart
Updating blocklists automatically
Add the following line to the file /etc/crontab
0 13 * * * root
peerguardian.sh restart
Monitoring
You can monitor Peerguardian by inspecting the log file /var/log/PG.log
watch tail /var/log/PG.log
References
This post on ubuntuforums.org
Post new comment