PeerGuardian BlockList Filter for HG
From Buffalo NAS-Central
Contents |
[edit] Moblock for Silver KuroboxHG
Moblock is the official Linux Peerguardian client. It load peerguardian file ( .p2p, .p2b, .dat) into iptables filter.
[edit] Installation
[edit] Requiered
- Moblock 0.8 ( https://developer.berlios.de/project/showfiles.php?group_id=2509 )
- kernel 2.6.18( http://www.kurobox.com/sylver/debian/kernel-2.6.18-mh3_kurobox_hg-20060929.tar.gz )
- libnfnetlink ( http://www.netfilter.org/projects/libnfnetlink/downloads.html )
- libnetfilter_queue ( http://www.netfilter.org/projects/libnetfilter_queue/downloads.html )
[edit] Install Kernel Update
Dowload new kernel ( working only for kuroboxhg ). Put the archive on the root directory and untar
tar xvf kernel-2.6.18-mh3_kurobox_hg-20060929.tar.gz
Edit /etc/init.d/bootnewos for change the kernel. At the underlast line :
/sbin/insmod /boot/loader.o kernel=/boot/vmlinux.bin
Reboot, the fist line in your shell should now be :
Linux (none) 2.6.18-mh3_kurobox_hg #1 Tue Sep 26 16:19:42 CEST 2006 ppc unknown unknown GNU/Linux
[edit] Install Library
Extract and compile libnfnetlink
bzip2 -d libnfnetlink-0.0.16.tar.bz2 tar xvf libnfnetlink-0.0.16.tar cd libnfnetlink-0.0.16 ./configure make make install
Extract and compile libnetfilter_queue
bzip2 -d libnetfilter_queue-0.0.12.tar.bz2 tar xvf libnetfilter_queue-0.0.12.tar cd libnetfilter_queue-0.0.12 ./configure make make install
Update library link
ldconfig
You may have to tell ldconfig where to look for the library files (if you get errors about not finding "libnetfilter" or other libraries when you run moblock). If so, then, instead of just running "ldconfig" use
ldconfig /usr/local/lib
(Debian seems to put the library files in /usr/local/lib. Depending on your distro/config, you may have to replace "/usr/local/lib" with the path to the libraries you installed earlier)
[edit] Install Moblock
Extact and compile Moblock. You must before edit the makefile for remove arch information :
tar xvf MoBlock-0.8-i586.tar cd Moblock-0.8 vi Makefile
remove :
-march=i586 -mtune=i686
now we can compile
make make install
[edit] Use
Moblock only filters packet that are queued with the NQUEUE interface. See the Moblock readme for more information. We will use Moblock default startup script.
Just copy MoBlock-nfq.sh to /usr/bin
cp Moblock-nfq.sh /usr/bin
Edit the script for the moblock binary path, the blocklist path and the log path.
vi /usr/bin/Moblock-nfq.sh # Here you can change block list and log files moblock -p /etc/guarding.p2p /var/log/moblock.log
Now just run
Moblock-nfq.sh
Categories: All Pages | Howto | Kurobox
