moblock-deb provides packages related to IP blocking software, similar to PeerGuardian: In order to protect your privacy internet traffic is blocked based on large lists of IP address ranges. The packages are MoBlock, NFBlock, blockcontrol and mobloquer.
MoBlock and NFBlock are IP block daemons, which do the actual blocking. blockcontrol is a CLI, designed to do all tasks related to IP block daemons (MoBlock or NFBlock). blockcontrol is developed here. It’s available as Debian package and as a separate download for all Linux distributions. mobloquer is a GUI on top of blockcontrol.
blockcontrol features:
* Start and stop IP block daemon. Or let init do this automatically.
* Update your blocklist from online sources and local blocklists. Or let cron do this automatically on a regular basis.
* Remove lines by keyword from the blocklists.
* Handle your iptables rules: use a default setup, easily allow all traffic on specific ports and use an allow list, or add your own sophisticated iptables rules.
* Allow all LAN traffic and the DNS server automatically. If you are on a public LAN, you probably want to disable this feature.
* Check the status and test the IP block daemon.
* A watchdog monitors the IP block daemon and restarts blockcontrol if necessary.
* Detects if kernel modules are needed and loads them if necessary.
* Set verbosity and logging options.
* Provides LSB 3.1 compatible init script.
* Daily rotation of the logfiles.
Install moblock
First,use this command to edit /etc/apt/sources.list:

sudo gedit /etc/apt/sources.list

Add the lines to the file,then save and close it.
Ubuntu 8.04 hardy:

deb http://moblock-deb.sourceforge.net/debian hardy main
deb-src http://moblock-deb.sourceforge.net/debian hardy main
deb http://archive.ubuntu.com hardy main universe

Ubuntu 8.10 intrepid:

deb http://moblock-deb.sourceforge.net/debian intrepid main
deb-src http://moblock-deb.sourceforge.net/debian intrepid main
deb http://archive.ubuntu.com intrepid main universe

Ubuntu 9.04 jaunty:

deb http://ppa.launchpad.net/jre-phoenix/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/jre-phoenix/ppa/ubuntu jaunty main
deb http://archive.ubuntu.com jaunty main universe

Ubuntu 9.10 karmic:

deb http://ppa.launchpad.net/jre-phoenix/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/jre-phoenix/ppa/ubuntu karmic main
deb http://archive.ubuntu.com karmic main universe

Add the gpg key:
for ubuntu 8.04/8.10:

gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 58712F29
gpg --export --armor 58712F29 | sudo apt-key add -

for ubuntu 9.04/9.10

gpg --keyserver keyserver.ubuntu.com --recv 9C0042C8
gpg --export --armor 9C0042C8 | sudo apt-key add -

Now,update and install:

sudo aptitude update
sudo aptitude install moblock blockcontrol mobloquer

Click here for more