Installing and Configuring Moblock In Ubuntu.

Moblock

Moblock !!! I Must have.........
OK, Moblock is basically the same as ipfilter.dat for utorrent, or PeerGuardian 2 for Windows.
So in other words "Moblock" is an ipfilter / PeerGuardian 2 for "linux".
I for one am a full beleiver in practicing C.Y.A. ( Cover Your A*s )
So here's how people..
To add Moblock in your /etc/apt/sources.list is necessary to keep up-to-date...
Code:
nano /etc/apt/sources.list
And add this to your list...
Code:
deb http://ppa.launchpad.net/jre-phoenix/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/jre-phoenix/ppa/ubuntu jaunty main
( Replace "jaunty" with what-ever version of Ubuntu your using )

Import the keys...
Code:
gpg --keyserver keyserver.ubuntu.com --recv 9C0042C8

gpg --export --armor 9C0042C8 | sudo apt-key add - && sudo apt-get update
Now we're ready to install Moblock...

Code:
sudo aptitude update
sudo aptitude install moblock blockcontrol libnetfilter-queue1 libnfnetlink0 p7zip-full libnetfilter-queue-dev mobloquer
Now for some useful commands you'll need / want to know...

1) Start MoBlock
Code:
blockcontrol start
2) Stop MoBlock
Code:
 blockcontrol stop
3) Restart MoBlock
Code:
blockcontrol restart
4) Rebuild Blocklist
Code:
blockcontrol reload
5) Update Blocklists
Code:
blockcontrol update
Moblock is then reloaded....
6) MoBlock Status
Code:
blockcontrol status
7) Test MoBlock
Code:
blockcontrol test
( The test has been known to have problems in older versions of MoBlock. Look at the log to check if you are unsure. This can be done interactively (this command will show you the log in real-time).)
8) This is My Favorite...You see Moblock doing its J.O.B. !!!
Code:
tail -f /var/log/moblock.log
and
Code:
tail -f /var/log/blockcontrol.log
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>
If you do not want Moblock to run at start up, edit the following file...
Code:
nano /etc/blockcontrol/blockcontrol.conf
Set the following to ...
Code:
INIT="0"
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>

These are the facts on the blocklist avaliable...
The Sources for each list are as follows:
Normal -----

* Bad Peers list
* Bogon
* D-Shield
* Hijacked
* IANA Multicast
* IANA Private
* IANA Reserved
* Level 1 [ Anti-P2P ]
* level 2 [ Corp ]
* Microsoft
* Non Lan List

Paranoid ----

* Ad-Trackers
* Bad Peers List
* Bogon
* D-Shield
* EDU
* Hijacked
* IANA Multicast
* IANA Private
* IANA Reserved
* Level 1 [ Anti-P2P ]
* Level 2 [ Corp ]
* Level 3
* Microsoft
* Non Lan List
* Proxy
* Spiders
* Spyware
Here is where to get addictional blocklist
Code:
http://iblocklist.com/lists.php
Just right click on the one you want, and "copy link location" and then edit your /etc/blockcontrol/blocklists.list to take away or add to list...
Code:
nano /etc/blockcontrol/blocklists.list
This is My Own Custom Blocklist I "added" to the existing list....
Code:
# This is b366alive's list
# level1 (P2P)    
http://list.iblocklist.com/?list=bt_level1

# At&t ( My ISP )
    
http://list.iblocklist.com/?list=att

# level2
http://list.iblocklist.com/?list=bt_level2

# bogon
http://list.iblocklist.com/?list=bt_bogon

# dshield
http://list.iblocklist.com/?list=bt_dshield

# hijacked
http://list.iblocklist.com/?list=bt_hijacked

# iana-reserved
http://list.iblocklist.com/?list=bcoepfyewziejvcqyhqo

# iana-private
http://list.iblocklist.com/?list=cslpybexmxyuacbyuvib

# iana-multicast
http://list.iblocklist.com/?list=pwqnlynprfgtjbgqoizj

# ipfilterX
http://list.iblocklist.com/?list=nxs23_ipfilterx

# templist
http://list.iblocklist.com/?list=bt_templist
Now this is the output of my log file...
Code:
Sun May 31 05:04:00| * Ranges loaded: 846330
And started blocking as soon as I had time to look at it, downloading/seeding from Demonoid, and TPB ...

I went ahead and did a whois check on Planb2.org ( No longer There ) and found the IP, and added it to My " Whitelist"...

Here's how...
Code:
nano  /etc/blockcontrol/blockcontrol.conf
And add this to at the end of the file...
Code:
WHITE_IP_IN="94.23.158.159/24"
WHITE_IP_OUT="94.23.158.159/24"
Now here is the link for all the details from The Ubuntu Community Documentation...
Code:
https://help.ubuntu.com/community/MoBlock
Need help or want to talk about Moblock ? Click Here.

Thank You, LinuxTuts linuxadmin