PDA

View Full Version : IPP2P - compiling problem


Malbrouck
2008-02-05, 12:44 AM CST
Hello,


I'm unable to compile the iptables module IPP2P on my Fedora 8 box. :mad:

Here's what's happening when trying to compile:

[root@monpc ipp2p-0.8.2]# make
make -C /lib/modules/2.6.23.14-107.fc8/build SUBDIRS=/usr/local/src/ipp2p-0.8.2 modules
make[1]: entrant dans le répertoire « /usr/src/kernels/2.6.23.14-107.fc8-i686 »
CC [M] /usr/local/src/ipp2p-0.8.2/ipt_ipp2p.o
/usr/local/src/ipp2p-0.8.2/ipt_ipp2p.c: In function ‘match’:
/usr/local/src/ipp2p-0.8.2/ipt_ipp2p.c:751: erreur: ‘const struct sk_buff’ has no member named ‘nh’
/usr/local/src/ipp2p-0.8.2/ipt_ipp2p.c: Hors de toute fonction :
/usr/local/src/ipp2p-0.8.2/ipt_ipp2p.c:871: attention : initialization from incompatible pointer type
/usr/local/src/ipp2p-0.8.2/ipt_ipp2p.c:874: attention : initialization from incompatible pointer type
/usr/local/src/ipp2p-0.8.2/ipt_ipp2p.c: In function ‘init’:
/usr/local/src/ipp2p-0.8.2/ipt_ipp2p.c:883: erreur: implicit declaration of function ‘ipt_register_match’
/usr/local/src/ipp2p-0.8.2/ipt_ipp2p.c: In function ‘fini’:
/usr/local/src/ipp2p-0.8.2/ipt_ipp2p.c:888: erreur: implicit declaration of function ‘ipt_unregister_match’
make[2]: *** [/usr/local/src/ipp2p-0.8.2/ipt_ipp2p.o] Erreur 1
make[1]: *** [_module_/usr/local/src/ipp2p-0.8.2] Erreur 2
make[1]: quittant le répertoire « /usr/src/kernels/2.6.23.14-107.fc8-i686 »
make: *** [ipt_ipp2p.ko] Erreur 2

I couldn't find any help on the official web site -> http://ipp2p.org/

Is there a Fedora 8 RPM dedicated or including this IPP2P module ? :confused:

Thanks

GPonce-MdP
2008-02-05, 05:53 AM CST
I'm not a Fedora's user, but I've been involved on the same problem the last 2 days and I've found a solution (I use Debian Lenny with Linux-image-2.6.22-3-k7 and Iptables v1.3.8)

The solution to me was:

1) Download ipp2p last release and Gentoo's kernel patch for ipp2p

wget http://ipp2p.org/downloads/ipp2p-0.8.2.tar.gz

wget http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/net-firewall/ipp2p/files/ipp2p-0.8.2-kernel-2.6.22.patch

(there is a patch for Iptables 1.4.0 of you need at wget http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/net-firewall/ipp2p/files/ipp2p-0.8.2-iptables-1.4.0.patch)

2) Untar ipp2p at /usr/src and make a clean copy of it:
cd /usr/src
tar xvzf ipp2p-0.8.2.tar.gz
cp ipp2p-0.8.2 ipp2p-0.8.82.orig

3) Apply patch:
cd ipp2p-0.8.2
patch -p1 <../ipp2p-0.8.2-kernel-2.6.22.patch
(also patch iptables if you need it ---> patch -p1 <../ipp2p-0.8.2-iptables-1.4.0.patch)

4) Modify Makefile
vi makefile
Search for this line: ld -shared -o libipt_ipp2p.so libipt_ipp2p.o
Replace with this: $(CC) -shared -o libipt_ipp2p.so libipt_ipp2p.o
Save&exit

5) Do 'make' if all is right there are some new files created: libipt_ipp2p.so ipt_ipp2p.ko

6) Copy libraries and run depmod

cp libipt_ipp2p.so /usr/local/lib/iptables/
cp ipt_ipp2p.ko /lib/modules/2.6.24-l7/kernel/net/netfilter/
depmod -a

7) Test IPP2P

iptables -m ipp2p --help

If it's working you gonna see a help text about ipp2p :cool:

I hope you find this usefull ! :)


Gerardo Ponce
Mar del Plata = Argentina

Malbrouck
2008-02-06, 03:48 AM CST
Great !

It's working fine with the patch !

Thanks a lot Gerardo :-)

Malbrouck
2008-02-06, 07:27 AM CST
Did you try the patch for iptables 1.4.0 Gerardo mentioned in his post ?

Where are you blocked in Gerardo's 7 items procedure ?

GPonce-MdP
2008-02-06, 07:40 AM CST
Sajuki:

Pay attention on steps 3 & 4, may be is the need to patch iptables 1.4.0 with the patch I mentioned or may be you forgot to change the linker 'ld' to $(CC) to compile the library, as I refer on step 4.

Are you running linux-image-2.6.22-14-generic ? or another one?
Do you have linux-source 2.6.22-14 (according to your kernel image) installed?
Do you have iptables 1.4.0 source installed?


Hasta Luego !

Gerardo Ponce
Mar del Plata = Argentina

sajuki
2008-02-06, 11:38 AM CST
Hello

Yes I have tried also that patch for iptables 1.4.0 Gerardo mentioned in his post

Where are you blocked in Gerardo's 7 items procedure ?

I can do steps 1-4 with no problem

Here is a clip of modded Makefile *only the last rows of it, but the rest is the same thna before.. right, so it looks ok.. :confused:

libipt_ipp2p.so: libipt_ipp2p.c ipt_ipp2p.h
$(CC) $(CFLAGS) $(IPTABLES_OPTION) $(IPTABLES_INCLUDE) -fPIC -c libipt_ipp2p.c
$(CC) -shared -o libipt_ipp2p.so libipt_ipp2p.o

clean:
-rm -f *.o *.so *.ko .*.cmd *.mod.c
endif

But when I do that make, it just gives those errors, I posted earlier...

I have also tried some other ipp2p kernel patches and then make it just gives me another errors :( What Am I doing wrong ...

The not so funny thing is that I have been strugling with this ipp2p for many days now, and once got it to work with this kernel, but then i had to re-partition my hardrive with live cd and the whole ubuntu died so I had to reinstall ubuntu and there went the succesfully compiled ipp2p files :( and now I cant seem to install it succesfully anymore :(

Any help/suggestions.. :confused:






Any help highly appreciated




EDIT: Are you running linux-image-2.6.22-14-generic ? or another one?
Do you have linux-source 2.6.22-14 (according to your kernel image) installed?
Do you have iptables 1.4.0 source installed?


Yes I am running 2.6.22-14-generic

I have dloaded and untarred wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.22/14.tar.bz2

and

wget http://iptables.org/projects/iptables/files/iptables-1.4.0.tar.

and made sy link to it ln -s iptables-1.4.0 iptables

and also did before trying to install ipp2p

apt-get update
apt-get install build-essential
apt-get install kernel-package
apt-get install libncurses5-dev


Any help.. :confused:

GPonce-MdP
2008-02-07, 03:38 AM CST
OK!

I suggest to try with iptables v1.3.8 (the package available for Debian Testing), do the changes and try again...

If not possible to use iptables 1.3.xx I have no other solutions in hand.


;)

Gerardo Ponce
Mar del Plata = Argentina

sajuki
2008-02-07, 07:20 AM CST
Well I think i finally got ipp2p to work (installed kernel version and compiled kernel and iptables etc..) But now I am facing another problem :(

Trying to get Layer7 (http://l7-filter.sourceforge.net/) support to work (have tried both userspace and kernel version) and I get this

iptables: match `layer7' v1.4.0 (I'm v1.3.8).


I have iptables 1.3.8 loaded from netfilter site... (BTW Whats that debian test version and where to get it from..?)


I tried iptables ver 1.4.0 to correct that error and it gives me ipp2p error :(

iptables: match `ipp2p' v1.4.0 (I'm v1.3.8).


This is driving me nuts...

Any suggestions?

Could it be that my iptables is somehow fcked up...? If so how to clean that whole thing up completely..?

sajuki
2008-02-11, 12:25 PM CST
Well well.. problems continue :(

Been trying to sort problem out and I found out the following

when I install ipp2p it gives me following warning (on both versions compiling kernel /doing make..)

/usr/src/ipp2p-0.8.2/ipt_ipp2p.c:888: warning: initialization from incompatible pointer type
/usr/src/ipp2p-0.8.2/ipt_ipp2p.c:891: warning: initialization from incompatible pointer type


Is this fatal ..? At least it seems now that ipp2p module wont work :(

iptables -m ipp2p --help and commands can be applied with no problem, but it just doasnt block or limit anything like it should... :(

Like I told before I have got it working once before and then it blocked bittorrent nicely etc.. now it does nothin... :(

Any suggestions... Should I try some "very" old kernel or so?

now I have iptables 1.3.8 and kernel 2.6.22-14

sajuki
2008-02-13, 03:11 PM CST
Still not working :(

I tried setting up a Shorewall firewall and it says the same :


ERROR: Your kernel and/or iptables does not have IPP2P match support.


The strange thing is that the ipp2p -help and commands still seems to apply, but just have no effect whatsoever...

paulez
2009-02-26, 10:30 AM CST
Hi,

I have just made a patch for ipp2p working with 2.6.28 kernel. It seems to work on my gateway.
You can find the patch here : http://aur.archlinux.org/packages/ipp2p/ipp2p/ipp2p-0.8.2-kernel-2.6.28.patch .
I have made this patch for 2.6.28 version, so the changes will be effective only if you compile with a 2.6.28 kernel.

anto1ne
2009-03-16, 07:50 PM CDT
thanks for the patch, I had problems too, but now at least it does compile.
but it still doesn't work, when I use it, output says :
iptables v1.4.2: Couldn't load match `ipp2p':(null)

kernel module loads without problem, and I tried different versions of iptables (1.3.6 1.4.1 & 1.4.2 )
which exact version did you use of kernel+iptables ?