Secure your Linux box with MoBlock
Advisor:
Sukrit has spent over seven years working with several organisations and helped them adopt GNU/Linux and other free and open source tools.
Resources:
moblock (or here for Debian/Ubuntu users)
blockcontrol
mobloquer
MoBlock is an open source application for the Linux platform that allows you to manage connections to and from your computer. If you have used or heard of the program PeerGuardian, MoBlock has a pretty similar function. The project caters to advanced Linux users and allows them fine-grain control over which hosts are allowed to connect to your computer and which hosts can be connected from the machine. We’ll look at how to install, configure and monitor MoBlock on your Linux machine.
Installation
01 The installation of MoBlock is pretty straightforward for users of Ubuntu Linux. Ubuntu has had MoBlock available in its package management systems for some time now. You will need to add a new set of repositories to download and install MoBlock and the other supporting tools with ‘apt-get’. As a first step, you need to add GPG keys.
For Hardy and Intrepid, type the following lines in a terminal window:
gpg –keyserver wwwkeys.eu.pgp.net –recv 58712F29
gpg –export –armor 58712F29 | sudo apt-key add -
For Jaunty and later versions, type the following lines in the terminal window:
gpg –keyserver keyserver.ubuntu.com –recv 9C0042C8
gpg –export –armor 9C0042C8 | sudo apt-key add -
02 Now edit the ‘apt-get’ source file and add the following repository entries. Run the command ‘# sudo vim /etc/apt/sources.list’ to edit the file.
If you are running Ubuntu 9.10 (Karmic Koala), add the following lines:
deb http://ppa.launchpad.net/jre-phoenix/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/jre-phoenix/ppa/ubuntu karmic main
For Ubuntu 9.04 (Jaunty Jackalope), instead add this:
deb http://ppa.launchpad.net/jre-phoenix/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/jre-phoenix/ppa/ubuntu jaunty main
For other versions, please read the instructions in the Ubuntu documentation.











The great thing about moblock is it allows outgoing http so you can browse with it running(unlike pg2).
Also go to iblocklist.com for all the lists you’ll ever need.
thanks, helpful
Doesn’t iplist do the same thing?
http://iplist.sourceforge.net/
May I suggest iplist? It is easy to install (just download and start the GUI) and use and it is not out of development.
http://iplist.sourceforge.net/
I’ve been using it for over a year. It’s definitely something I’d consider an absolute must-have for any Linux set-up. When you first start using it there are a couple things to keep in-mind.
First, if you have trouble connecting to ANYthing, check the logs to see if Moblock is the culprit (95% of the time, it is). The first thing most users will notice is that their Pidgin/Empathy/IMclientOfChoice stops working. The log will list the IP’s and info about the IP’s, so just whitelist them if need be. It’s really a very strong utility and will block pretty much everything until you tell it to do otherwise.
Second, I love using an xterm for just about everything I do, however… Mobloquer is so amazingly good that I rarely touch MoBlock in a terminal. I’m willing to bet most users will feel the same. So, I suggest the first thing you do after installing Mobloquer is: THROW IT IN YOUR STARTUP MENU. Obviously this isn’t necessary given MoBlock starts on its own… but MOBLOQUER is a very handy thing to have hanging out in your system tray. Especially if you are trying to connect to something and failing… the startup icon serves as a geat reminder (slap to the forehead | d’oh) that, indeed, MoBlock is probably the cause.
Again, definitely in my top-10 installs. Couldn’t be more highly recommended.
Good writeup, Sukrit.
Oh geez…don’t bother going through all of the key adding etc when using a PPA on Launchpad.
You are using Ubuntu 9.10, right?
Simply use:
sudo add-apt-repository ppa:jre-phoenix/ppa && sudo apt-get update && sudo apt-get install moblock blockcontrol mobloquer
and you are done!
This can all be done perfectly using iptables and the hosts.deny and hosts.allow files. MoBlock is the lazy artless way of going about it.
Really the lazy way. I would say the smart way. It’s like saying using a pre-built OS (ubunto or many other versions of linux) is lazy. No it is not re-inventing the wheel. It is using what has been made and then making it for you. I don’t see what is wrong with that.
What's your opinion?