Have you ever used PeerGuardian for Windows? Well good news my friend, there’s a Linux alternative available.

PeerGuardian is a program that blocks companies such as the RIAA and their affiliates (such as Media Defender) from connecting to your computer when you are running P2P software.  This is not foolproof by any means, but certainly a step in the right direction.

When I used Windows, one of the programs I used to protect my online privacy was PeerGuardian. Now that I’m using Ubuntu full-time, I’d like to find an alternative.

A quick google search found that PeerGuardian actually has a Linux client, but the installation is far more difficult than another program I found called MoBlock. Not only does it come pre-setup with most of the Bluetack blocking lists, the same ones that PeerGuardian uses, but it will also utilize the eMule ipfilter.dat file format, if you’re looking for that.

Ok, now I know we’re looking at the rest of this document and saying,

Sh!t Wayne, this looks complicated.

It’s actually really easy if you follow it step by step, and if you have any questions, feel free to comment and I’ll do my best to help you out.

Deep breath, here we go.

First, we edit sources.list to add a repository:

gksu gedit /etc/apt/sources.list

Paste these two lines at the end:

deb http://moblock-deb.sourceforge.net/debian feisty main
deb-src http://moblock-deb.sourceforge.net/debian feisty main

Save and Close the gedit program, just a few more commands:

gpg --keyserver wwwkeys.eu.pgp.net --recv 9072870B
gpg --export --armor 9072870B | sudo apt-key add -
sudo apt-get update
sudo apt-get install moblock-nfq

Now it’s installed! Congratulations. Now we need to configure the program so that HTTP (website) traffic is unfiltered. This program likes to be as paranoid as possible to start out with, which can be a good thing for some people.

gksu gedit /etc/moblock/moblock.conf

Look for the following section about half-way down:

WHITE_TCP_IN=""
WHITE_UDP_IN=""
WHITE_TCP_OUT=""
#WHITE_TCP_OUT="http https"

WHITE_UDP_OUT=""
WHITE_TCP_FORWARD=""
WHITE_UDP_FORWARD=""

Remove the hash (#), save and you’re done.

Run this command to test and make sure it’s working properly:

EDIT

Thanks to mbsjoblom on Digg, I missed a step.

sudo moblock-control reload
sudo moblock-control test

You should get a message something like this:

* MoBlock blocked the IP. Test succeded.

EDIT 2

Thanks to “Moblockin” there is a GUI available , which I haven’t tried out, but seems like a more user-friendly than the command line.

Now, you have no more big brother looking after you. MoBlock will automatically do it’s magic behind the scenes with no interaction from you – ever!



Are you interested in FREE SUBSCRIPTIONS for qualified professionals to eWeek, PC Magazine, PC World, and many more? Click here!

Tags: , ,


86 Comments to “Do You Use Linux? The RIAA and MPAA Don’t Want You To Use This Program”

  1. gmc | September 30th, 2007 at 3:19 am

    My interest is piqued (edit) by this program, unfortunately there is no information about using it on Gusty. After all only 19 days to go.

    Edited by Wayne at 6:33pm on Sun Sept 30
    Don’t give him a hard time, my spelling errors are far warse. ;-) -Wayne

  2. gmc | September 30th, 2007 at 3:23 am

    I spoke too soon. I found information about a Gusty version at the following address:

    http://moblock-deb.sourceforge.net/

    :-) – that’ll learn me to look before I speak…

  3. joe | September 30th, 2007 at 9:32 am

    I get the following when trying the test:

    $ moblock-control test
    Testing MoBlock: trying to ping from /etc/moblock/guarding.p2p …
    open: Permission denied
    * MoBlock did not block the IP. Test failed.

  4. charles | September 30th, 2007 at 9:42 am

    The test actually failed for me in the end, it said failed to block IP. I wonder if it has something to do with this part of the installation:

    Setting up moblock-nfq (0.8-21+gutsy) …
    Updating blocklists and reloading MoBlock if any blocklist was updated …done.
    Empty blocklist!
    Starting MoBlock …done.

    Empty blocklist doesn’t sound proper at all. Any ideas? Thanks!

  5. corrected gmc | September 30th, 2007 at 9:51 am

    I think that you meant ‘piqued’.

  6. teacoz | September 30th, 2007 at 9:52 am

    I got a MoBlock did not block the IP. Test failed.
    error when testing after following all of your commands with everything else successful. Google is not being friendly with the error, also looked through the sourceforge but didn’t see anything, so any help (a link is fine too!) would be most appreciated. OS is Kubuntu 7.04 i386.

  7. Some guy | September 30th, 2007 at 10:02 am

    see those para in form? this is why linux sux and will not be taken up until it becomes idiot friendly

  8. Will | September 30th, 2007 at 10:05 am

    This does not work on Ubuntu Feisty. Were there any other steps you did? ‘test’ failed, even after editing the config, and performing another ‘update’.

  9. art | September 30th, 2007 at 10:15 am

    Followed your instructions, everything seemed to work. Ran the ‘moblock-control test’ and it failed.

    :~$ moblock-control test
    Testing MoBlock: trying to ping from /etc/moblock/guarding.p2p …
    open: Permission denied
    * MoBlock did not block the IP. Test failed.

  10. bdragonmsl | September 30th, 2007 at 10:18 am

    I noticed this program before. It’s a good idea, but most torrent programs offer an ip filter plugin. Ktorrent does, so does Deluge. But I’m not sure as to whether moblock is better than using the plugin.

  11. Jack | September 30th, 2007 at 10:33 am

    This doesnt work in gutsy, well not out of the box anyway, will do some fiddling and see wtf i need to do.

  12. john | September 30th, 2007 at 10:34 am

    i did the test and get this
    moblock-control test
    Testing MoBlock: trying to ping from /etc/moblock/guarding.p2p …
    * MoBlock did not block the IP. Test failed.

  13. Required | September 30th, 2007 at 10:39 am

    anyone else as annoyed by that #$*^ing auto-follow RSS link? Use adblock to kill genkitheme.js and it goes bye-bye.

    Seriously, man, it pisses me off. Why the hell do you think someone actually visiting your site would want to use RSS? And why are you so intent on shoving it down my throat?

  14. rr | September 30th, 2007 at 10:57 am

    Does PeerGuardian & co. really help with something? OK, have a list of IP’s known to have been used by some or other RIAA or MPAA or whatever group wanting to sue you for filesharing and block them. So they just take a new IP to find (and sue) 10,000 file-sharers who want the damn cool Bioshock or not so damn cool (because I read 1,234,567 posts the last 2 days about it not being so cool) Halo 23 or whatever.

    Using PeerGuardian or similar software you just draws attention to you. Either buy the stuff if you really want it *now* or wait a few month and download it, this way the chances of someone bothering to catch you for sharing it are very low – in some 6 month the new version 66 of Halo will be there, so who gives a shit if you download version 23 then?! ;-)

  15. john | September 30th, 2007 at 11:04 am

    I get this:

    username@myhost:/etc/moblock$ moblock-control test
    Testing MoBlock: trying to ping 4.2.144.32 from /etc/moblock/guarding.p2p …
    open: Permission denied
    * MoBlock did not block the IP. Test failed.

    So I tried it with a sudo:

    username@myhost:/etc/moblock$ sudo moblock-control test
    Testing MoBlock: trying to ping 4.2.144.32 from /etc/moblock/guarding.p2p …
    * MoBlock did not block the IP. Test failed.

  16. joe | September 30th, 2007 at 11:13 am

    my test failed….it didn’t block the IP. What now?

  17. glenmo | September 30th, 2007 at 11:35 am

    well, i agree with required but not as intensely… the auto-follower is annoying but i’m actually quite intrigued by your site… it’s a minor annoyance but it won’t stop me from reading your articles and coming back…

    as for this article– thank you very much– i’m all about this.

  18. AC | September 30th, 2007 at 12:41 pm

    Yeah, if someone wants to subscribe to RSS it is available in the firefox url address bar. No need to follow me every time I visit the page. It’s more annoying when someone has already subscribed to it. I think I will remove the subscription…

  19. theNrg | September 30th, 2007 at 12:44 pm

    i agree with Required. the RSS button is annoying as hell. why would u think people will like it ?

    anyhow, thanks for the post. most useful.

  20. yes | September 30th, 2007 at 1:14 pm

    Yes, the RSS is bugging me too, the RSS button is perfectly visible on address bar anyway (firefox).

  21. Adam Pope | September 30th, 2007 at 1:15 pm

    I tried that (using the debian gutsy main instead, mind) and when I went to open moblock.conf it provided me with a blank document. Any ideas why this might have been the case?

    I like your blog, anyhow, it’s the second article I’ve read today, so I’m gonna use that RSS button and subscribe (the auto-follow is clever but a bit annoying though)…

  22. Jack Valenti | September 30th, 2007 at 1:32 pm

    Be sure to update your Bluetack lists at least once a week.

  23. PMS | September 30th, 2007 at 1:42 pm

    Sorry guys, Required is having his period. He gets especially grumpy when he doesnt have his afternoon nap.

    That auto-follow RSS link rocks. Ima learn how its done.

  24. RoamingGnome | September 30th, 2007 at 1:43 pm

    Nice! Please port this to OS X!

  25. Mia | September 30th, 2007 at 1:46 pm

    Hi,
    Thank you for the article. I followed your instructions, except I typed “feisty” instead of “gutsy”. When I tried the test command, I received “MoBlock did not block the IP. Test failed”.
    I cut and paste the commands from the article into the terminal window to avoid spelling mistakes. I also tried the instructions twice to see if I had missed a step.
    If you could help me with what went wrong, I would be grateful.
    Mia

  26. pw | September 30th, 2007 at 2:03 pm

    Thanks for the info about moblock. I just tried to install it, and everything went quite quickly, until the moblock-control test, which gave me a “fail” message. I went back to see if I screwed anything up in the gedit portions, but how could I have? All I needed to do was to add the repositories to sources.list and then to remove the hatch in the specified area in the moblock configuration file, right? What can I do to fix this?

  27. kickingmyself | September 30th, 2007 at 2:05 pm

    So, what happens if it says that the test failed at the end… What then? And how do you uninstall said software should you receive the error I just mentioned?

  28. ploik | September 30th, 2007 at 2:08 pm

    thanks, that is really annoying.

  29. Anti-JS | September 30th, 2007 at 2:16 pm

    Why not disable javascript (uncheck the button, use noscript, etc.) entirely? Don’t run a program unless /you/ want to run a program, rather than relying on what some website creator to do your thinking for you.

  30. BK | September 30th, 2007 at 2:16 pm

    Followed the commands perfectly, but when I get to the test it says “MoBlock did not block the IP. Test failed.” What gives? I have a sneaking suspicion that it has something to do with the previous line which mentioned an empty blocklist… guess i’ll poke around and see how to fix that?

  31. Name | September 30th, 2007 at 2:33 pm

    Seriously, that RSS link would be far less annoying if it were position: fixed;

  32. storm | September 30th, 2007 at 2:46 pm

    For all those who can’t get the test working, run:

    sudo moblock-control update

    Then

    moblock-control test

    should work.

  33. Wayne | September 30th, 2007 at 3:00 pm

    Thanks for all of your comments everyone, and a huge thanks to digg readers, I have edited the article with two more steps to get it working.

    sudo moblock-control reload
    sudo moblock-control test

    Ok, the RSS link is going to be fixed position soon – I don’t have time to muck around with it right now – I thought it was pretty cool, and it has worked to gain RSS subscribers, but honestly I’d rather not loose visitors due to the ‘annoying’ nature of it.

    -Wayne

  34. n0xie | September 30th, 2007 at 3:51 pm

    Ip lists like PeerGuardian and the like are just foolish. You are just tricking people into a false sense of security. If they were out to get your ip, they would use either proxies or new ip ranges. Most likely they would just rent some server at some random datacenter which has more ip’s available than most small countries. Also it’s really not that hard to spoof an ip.

    If you are going to download pirated material, then that is your choice. Trying to cover your tracks is just silly and childish.

    Besides that, isn’t the whole idea of using Linux that you are using free, open software? So what are you afraid of?

  35. Do You Use Linux? The RIAA and MPAA Don’t Want You To Use This Program | September 30th, 2007 at 3:51 pm

    [...] More info: here [...]

  36. Russ | September 30th, 2007 at 4:15 pm

    I just tried it with the edit and it still failed.:-P

  37. Russ | September 30th, 2007 at 4:19 pm

    This time I tried it with just the “sudo moblock-control test” command line and it worked. Before I had pasted both. Yes, I’m new at this!:-D :-)

  38. Moblockin | September 30th, 2007 at 4:22 pm

    http://www.gnomefiles.org/app.php/MoBlockGUI
    Try this. It is a frontend to moblock. A little more handy for those into GUI over CLI.

    (calm down, zealots who will flame me for not using CLI. Remember Linux is about choice. And I choose a GUI over CLI even if I know how to use the CLI)

  39. Wayne | September 30th, 2007 at 5:07 pm

    Thanks Moblockin, I’ve added your comment to the article.

    Good to know it’s working now Russ, I’m in Gutsy Gibbon right now working on my article on how much it costs to give away free software, so I can’t test it myself. Thank you for confirming.

  40. A Richards | September 30th, 2007 at 5:28 pm

    “My interest is peaked…”

    Piqued. Piqued. PIQUED.

  41. darkman | September 30th, 2007 at 5:50 pm

    Can’t talk…watching button…

  42. » Do You Use Linux? The RIAA and MPAA Don’t Want You To Use This Program Biker|Geek: Random thoughts of a Harley Davidson riding biker geek. | September 30th, 2007 at 7:05 pm

    [...] read more | digg story [...]

  43. SigT | September 30th, 2007 at 7:53 pm

    Moblock: un sustituto a PeerGuardian para GNU/Linux…

    PeerGuardian es un popular software con licencia libre encargado de filtrar ciertos rangos IPs mediante listas negras que debe su popularidad a que ha sido ampliamente usado para filtrar IPs sospechosas como pueden ser rangos gubernamentales, sociedade…

  44. The Sparky Mat » Blog Archive » Do You Use Linux? The RIAA and MPAA Don’t Want You To Use This Program | fsckin w/ linux | September 30th, 2007 at 9:06 pm

    [...] Do You Use Linux? The RIAA and MPAA Don’t Want You To Use This Program | fsckin w/ linux This entry was written by sparkymat and posted on October 1, 2007 at 9:28 am and filed under links. Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL. [...]

  45. BK | September 30th, 2007 at 11:55 pm

    The new reload and then test commands fixed my problem. Thanks :D

  46. mark | October 1st, 2007 at 6:50 am

    It seems that, from what I’m reading, the Linux version of PeerGuardian isn’t being developed anymore, and MoBlock is looking to be the official Linux version of PeerGuardian – see here:
    http://phoenixlabs.org/pglinux/
    and here:
    http://forums.phoenixlabs.org/t11376-introducing-moblock.html

  47. Linux IP Blocker | Blue Lotus Project Security Blog | October 1st, 2007 at 6:58 am

    [...] w/linux has an article on how to block access to your machine by IP address, similar to what PeerGuardian does on Windows. [...]

  48. Maverick | October 1st, 2007 at 8:16 am

    tried it and test failed. How can I remove it?

  49. Joe | October 1st, 2007 at 9:29 am

    Thanks Storm….it works now.

  50. tmick | October 1st, 2007 at 9:57 am

    just curious to the people that were using the CLI, I have two questions; 1) What text editor did you use? 2) when you finished editing the files did you use the chmod command on the files you created so your “regular” user has permissions to those files (use man chmod for more information)?

  51. praxis22 | October 1st, 2007 at 11:22 am

    My interest has definitely peaked, as there is no 64bit version. Blah!

  52. links for 2007-10-02 | The TDog's Blog | October 1st, 2007 at 8:28 pm

    [...] Do You Use Linux? The RIAA and MPAA Don’t Want You To Use This Program | fsckin w/ linux (tags: linux security ubuntu privacy bittorrent tools software peerguardian) [...]

  53. nekostar | October 2nd, 2007 at 5:53 am

    works out of th ebox in gutsy 32bit

  54. MoBlock - PeerGuardian for linux - Overclock.net - Overclocking.net | October 2nd, 2007 at 6:50 am

    [...] MoBlock will automatically do its magic behind the scenes with no interaction from you – ever! source MoBlockGUI version 0.1 i thought someone might find this useful. __________________ Fore [...]

  55. drJ | October 2nd, 2007 at 7:27 am

    RSS button following me everywhere — what does it want?

  56. ikaruga | October 2nd, 2007 at 9:49 am

    Jeez…this seems like a lot of hard work to pirate music and videos. Why don’t you bite the bullet and go legit?

  57. praxis22 | October 2nd, 2007 at 9:54 am

    @ikaruga (cool game btw :)
    For the same reason people climb mountains I imagine, “because it’s there” and “because they can”

    Not to mention the kudos from their peer group. Why else would teenagers wear pants so loose they have to hold them up when they walk?

  58. Joshua Jabin | October 2nd, 2007 at 1:04 pm

    I followed the instructions exactly, but after I finished, I couldn’t access the internet at all using firefox. I uninstalled it and it started working again. Any ideas what went wrong?

  59. h33t | October 2nd, 2007 at 4:11 pm

    moblock is old technology

    use apf http://rfxnetworks.com/apf.php to load a static blocklist into iptables and run your blocklist in the kernel

    i posted the how to in bloth the moblock (peerguardian) and bluetack forums

    stop dancing with the enemy and use an ipfilter OR suffer the fate of torrentspy, isohunt, torrentbox, demonoid, etc etc

  60. Digg “Linux Nation” for Thursday October 4th 2007 | fsckin w/ linux | October 4th, 2007 at 1:48 pm

    [...] Do You Use Linux? The RIAA and MPAA Don’t Want You To Use This Program Number 2 with a bullet, this is a short how-to use a PeerGuardian alternative called MoBlock.  It blocks IP address ranges of not only the RIAA, MPAA and their affiliates, but also government agencies like the CIA.  MoBlock also cuts off all access to your computer IP addresses that send mostly corrupt data in p2p applications- usually associated with companies like Media Defender. [...]

  61. Dennis Dunbar | October 8th, 2007 at 1:01 pm

    So is this only for i386? I can’t seem to find a PPC version.

  62. dyn | October 15th, 2007 at 11:17 pm

    MoBlock is a great program. :) I’d just like to quickly comment that the WHITE_TCP_OUT line may need a few more tweaks for some people. For instance, mine looks like this:

    WHITE_TCP_OUT=”21 22 80 443 995″

    The default of http and https is good for most things, but if you access a gmail account from an email application (Thunderbird for instance), you may need port 995 as well. I added ftp (21) and ssh (22) for good measure.

  63. flo | October 23rd, 2007 at 12:40 pm

    hi, thank you for the howto, but i have a missed dependency:
    libnfnetlink1 isn’t available on my ubuntu gutsy system,any hints?

  64. Wayne | October 23rd, 2007 at 3:10 pm

    Try this:
    sudo aptitude search libnfnet

    Should find the package, then install it using
    sudo apt-get install packagename

  65. flo | October 24th, 2007 at 10:25 am

    hi, thx for your help but ther is no libnfnet>1

  66. flo | October 24th, 2007 at 10:26 am

    oh, html parsing error…
    i will repeat it:
    i need the libnfnet1, there is only a libnfnet0 :(

  67. Wayne | October 24th, 2007 at 3:10 pm

    flo I’ll try and remember to check into this later tonight.

  68. praxis22 | October 25th, 2007 at 7:18 am

    This is what you get out of gutsy (i386):

    sudo apt-cache search libnfnet
    libnfnetlink-dev – Development files for libnfnetlink0
    libnfnetlink0 – Netfilter netlink library
    libnfnetlink0-dbg – Debugging symbols for libnfnetlink0

    This the launchpad page:
    https://launchpad.net/ubuntu/+source/libnfnetlink

    There is no linfnet1 available. However you could probably put in a symbolic link from 1 -> 0 I doubt the requesting app would notice any difference, since the bulk of the libarary would be unchanged.

  69. flo | October 25th, 2007 at 2:30 pm

    hey, thank you :)
    but where i have to make the link?
    i think that should help?:
    senseless@senseless-desktop:~$ cat /var/lib/dpkg/info/libnfnetlink0.list
    /.
    /usr
    /usr/share
    /usr/share/doc
    /usr/share/doc/libnfnetlink0
    /usr/share/doc/libnfnetlink0/copyright
    /usr/share/doc/libnfnetlink0/changelog.Debian.gz
    /usr/lib
    /usr/lib/libnfnetlink.so.0.2.0
    /usr/lib/libnfnetlink.so.0
    senseless@senseless-desktop:~$

  70. MoBlock - PeerGuardian for Linux | Hackosis | October 25th, 2007 at 3:44 pm

    [...] Check here for an Ubuntu tutorial on MoBlock. [...]

  71. flo | October 25th, 2007 at 3:47 pm

    it’S funny, the howto on that site links to this tutorial :D

  72. praxis22 | October 26th, 2007 at 10:06 am

    From the looks of your find, I think this should work:

    ln -s /usr/lib/libnfnetlink.so.0.2.0 /usr/lib/libnfnet1

    Or:

    ln -s /usr/lib/libnfnetlink.so.0.2.0 /usr/lib/libnfnetlink.so.1

    Depending on what the actuall error you get back is, it will generally tell you the exact name of the libraray it’s looking for.

  73. Ubuntu Wiki / HowTo / » fsckin w/ linux | October 30th, 2007 at 10:08 am

    [...] example, if you followed my MoBlock article and suddenly couldn’t connect to google.com because you didn’t follow it [...]

  74. Basic P2P security « 0ddn1x: tricks with *nix | November 4th, 2007 at 1:39 pm

    [...] Basic P2P security Filed under: Linux, Security — 0ddn1x @ 2007-11-04 20:39:47 +0000 http://www.fsckin.com/2007/09/27/do-you-use-linux-the-riaa-and-mpaa-dont-want-you-to-use-this-progra... [...]

  75. Munich Unix » Do You Use Linux? The RIAA and MPAA Don’t Want You To Use This Program | November 5th, 2007 at 8:31 am

    [...] read more | digg story [...]

  76. Moblock: Peerguardian for Linux « tuxtoday | December 3rd, 2007 at 2:53 pm

    [...] I found out about moblock and how to configure it through this post and therefore, credits go that way. I just wanted to touch on this too, because it’s a great [...]

  77. Johan | December 3rd, 2007 at 2:55 pm

    I wrote about this in my blog too, and some stuff was copied from your site. I hope you don’t mind. I left credits at the bottom. Just wanted to shed some sunlight on moblock. I’m loving it. Thanks for the help with configuring it btw. :)

  78. Articler Blog » Blog Archive » Do You Use Linux? The RIAA and MPAA Don’t Want You To Use This Program | December 18th, 2007 at 5:27 am

    [...] a short tutorial how to use PeerGuardian alternative on Ubuntu called MoBlockread more | digg [...]

  79. ar-lock | January 20th, 2008 at 3:37 pm

    its called ktorrent it does everything…

    get it :P

  80. Technology Web - Do You Use Linux? | January 23rd, 2008 at 12:09 pm

    [...] Source: fsckin.com [...]

  81. Sneezy Melon | March 15th, 2008 at 10:02 am

    Does it work for KTorrent??

  82. Wayne | March 16th, 2008 at 1:56 am

    Moblock works with any program, and some programs have their own filtering that works with .dat files.

  83. Marco | April 20th, 2008 at 1:19 am

    I followed the steps listed but for some reason the install doesn’t work, when I put in the command:

    sudo apt-get install moblock-nfq

    I get this back:

    The following packages have unmet dependencies:
    moblock-nfq: Depends: libnfnetlink1 (>= 0.0.16) but it is not installable
    E: Broken packages

    any suggestions?

  84. ben | June 24th, 2008 at 4:47 pm

    @n0xie ip Spoofing is only good for outdated smurf attacks. Sessions cannot be finished with a spoofed ip, atleast not for the one doing the spoofing. Learn a bit of security before spewing false infol

  85. Bookmarks about Riaa | January 10th, 2009 at 11:45 am

    [...] – bookmarked by 5 members originally found by aelawen on 2008-12-11 Do You Use Linux? The RIAA and MPAA Don’t Want You To Use This… [...]

  86. kovenant | March 14th, 2009 at 11:56 am

    installed per your instruction on Intrepid. test passed. my question is… does this need to be started in terminal every time i boot, or does it run in the background automatically from now on?

Leave a Comment