Transmission blocklist on Ubuntu Server 12.04 LTS

Update 2/8/2015: The blocklist script has been updated once more. There was an issue with an “if” statement in the script that was causing the script to fail and not find certain files (as with Damien’s comment on 10/16/2014). The script should now be back in working order!

Update 9/8/2013: The blocklist script has been updated and actually looks a lot prettier than it did before. I did not create this script by hand. As I was scouring the internet looking for new blocklists, I came across and found Ragnarok’s script in the first post. I cleaned his code up a bit and that is the script you’re getting below.

Critical Update 9/8/2013: The website that the script below pulls the blocklists from has decided to make it so that you are unable to download their IP filters if you do not donate to their website. I am looking all over the place to try and replace these IP filters with a new provider and once I’m able to find one, I will update the script accordingly. For those of you wondering why the script doesn’t work, this is why. The script will not work as it is right now.

Update 5/30/2013: The webexploit blocklist was reported as being unavailable. After checking it out, it does look like it no longer exists in the list of blocklist .gz files. I have updated the script with five new blocklists and removed the webexploit from being called. You can download the new version by clicking the above link or you can copy/paste the script from above.

Update 12/21/2012: I’ve changed the reloading configuration at the bottom of the script. Before, it was restarting the transmission daemon. I’ve changed this so that it reloads the daemon instead of restarting it. Not a huge issue to worry about, but following the lead of my tutorial on how to actually install Transmission, I noted in there that it is always better to reload the transmission daemon service instead of restarting it.

You can download the blocklist script by clicking here. When you download the file, you need to rename it from updateblocklists.txt to so that you can run it from the command line. You need to make sure that you also run it using the sudo command if you aren’t logged in as root, otherwise the renaming and removing portions of the script won’t work. Also, be sure that in the script, you change the BLOCKLISTDIR variable at the beginning of the script to the correct path that points to your blocklist directory for Transmission.

This script currently, as of September 8th, 2013, adds 411,636 IP addresses to your Transmission blocklist.

Leave a Reply