Headless torrentbox with ipblock

As you may or may not know there are a lot of people who seem to be interested in the torrent activities of others. Some just like to track, others are government agencies, and of course the RIAA. I personally don’t like this intrusion into my habits so I do my best to block their attempts. In this small tutorial I’m going to cover how to install torrentflux with ipblock and fail2ban in a headless mode so you can download and seed torrents a bit more securely.

This is going to assume you have an ubuntu 7.10 LAMP server already setup. Here we go!

First get the prerequisites:

apt-get install libnetfilter-queue1 libnfnetlink0

Get the iplist package here this package includes the ipblock software as well.

wget <link to ipblock software>

Now since we are not using a front end we have to finagle the deb file so there aren’t any dependency issues with uninstalled graphical interfaces and tools.

dpkg-deb -x iplist_0.18-0gutsy1_i386.deb ./iplist_deb
dpkg-deb -e iplist_0.18-0gutsy1_i386.deb iplist_deb/DEBIAN
cd iplist_deb/DEBIAN/
nano ./control

In the line that starts with “Depends:” get rid of the last three dependencies. So kill of the following at the end of the line:

", sun-java5-jre | sun-java6-jre, gksu"

Save and exit then rebuild the package

cd ../../
dpkg -b ./iplist_deb iplist_0.18-0gutsy1_i386.deb
sudo dpkg -i iplist_0.18-0-headless_gusty_i386.deb

sudo cp /usr/share/doc/iplist/examples/ipblock.conf /etc/
sudo cp /usr/share/doc/iplist/examples/allow.p2p /etc/

sudo nano /etc/ipblock.conf

Set to start at boot (not sure if this actually works w/o the gui but it doesn’t hurt)

Setup your blocklists based on your preferences from the files listed in /usr/share/doc/iplist/README.lists
BLOCK_LIST="level1.gz Microsoft.gz ads-trackers-and-bad-pr0n.gz spy bogon.gz templist.gz"

I also like to keep my logfiles in one tidy spot and thusly change the LOG_FILE variable as follows, but this is entirely personal preference.

sudo ipblock -u
sudo /etc/init.d/ipblock start
sudo ipblock -l

Note: The updates run daily and the script can be found as /etc/cron.daily/ipblock Move or update this as you see fit, I like it updating daily though.

Finally make sure it starts at boot by checking with sysv-rc-conf or similar rc level tools.


Comments (5)

  1. 3:19 AM, 09/02/2011Martin  / Reply

    Thanks for this tutorial. Used it on Ubuntu 10.04.3 LTS Server with iplist 0.28 and works great.

    • 7:05 PM, 09/12/2011zloeber  / Reply

      Martin, I just updated the entire procedure to use apps which are a bit more maintained. You may want to check it out (sorry I didn’t have it posted prior to you going through the entire setup of your server man).

  2. 12:44 AM, 11/22/2008Mark  / Reply

    First time seeing this post when searching for iplist install. So far, it is the only one that works! Thanks.

  3. 7:42 AM, 09/25/2008ok  / Reply

    good site woxznz

  4. 1:02 PM, 09/18/2008obeaudet  / Reply

    Nice tutorial

    this almost the samething with Ubuntu 8.04 and iplist 0.21

    You need to copy this file also
    sudo cp /usr/share/doc/iplist/examples/ipblock.lists /etc/

    This file replace the README.lists, so you need to check this list to include the good package

Leave a Reply


Get every new post delivered to your Inbox

Join other followers