02.14
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)
AUTOSTART="Yes"
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.
LOG_FILE="/var/log/ipblock.log"
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.
Cheers!
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
good site woxznz
First time seeing this post when searching for iplist install. So far, it is the only one that works! Thanks.
[...] I did not attempt the complete removal of all GUI dependencies, since that would probably require going through the entire source codes. Instead, I will remove the bare minimum necessary that would allow successful build. A quick search on Google guided me to Headless torrentbox with ipblock. [...]