How to make sure Deluge’s blocklist stays up to date

deluge.png

I’m a fan of blocklists, I’ll admit.  They’re not a perfect solution to blocking out unwanted IP addresses, but every little bit helps.  Below I’ll show you how to use the Deluge Bit Torrent Client and Cron to ensure your blocklist stays up-to-date.

1.   Download deluge and p7zip

sudo apt-get install deluge p7zip

zypper in deluge p7zip

yum install deluge p7zip

2. Create directory for your scripts in your home folder if you don’t already have one.

mkdir ~/bin

3. Change to that directory and create your script

vim blocklist_fetch.sh

and insert this text within the script

wget http://phoenixlabs.org/lists/level1.7z
p7zip -d level1.7z
mv level1 /home/<your username>/level1

4. Make the script executable

chmod +x ~/bin/blocklist_fetch.sh

5.  Lets test the script, by running the script a file by the name of “level1″ should end up in your home directory.

/home/<your user name>/bin/blocklist_fetch.sh

if everything has worth thusfar, we’re ready to setup deluge.

6. Open Deluge –> Edit Menu –> Check the box for Blocklist Importer

7. With the blocklist imporer highlighed, hit the Preferences button

  1. Make sure the drop down states “PeerGuardian Text (Uncompressed)
  2. The Blocklist URL should read: /home/<your user name>/level1
  3. Download new blocklist every 1 day.
  4. Hit Ok and Restart Deluge

8.  And last but not least, lets get cron to download this list every single day to make sure you’re always up to date.

  1. vim ~/bin/jobs.cron
  2. Place the following line into the file ” 0 23 * * * /home/<your user name>/bin/blocklist_fetch.sh”
  3. In the commandline type: crontab /home/<your username>/bin/jobs.cron
  4. Verify the cronjob is set by typings: crontab -l

And you’re done.  Enjoy

Related Posts

Comments are closed.