LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-18-2009, 04:42 PM   #1
moekad
Member
 
Registered: Feb 2009
Posts: 64

Rep: Reputation: 15
ipp2p


hey need to block torrent using iptables
they told me there's ipp2p xtables-addons-common
i download it from ipp2p.com
when i compile it give this error:
make -C /lib/modules/2.6.28-11-generic/build SUBDIRS=/home/kad/ipp2p modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.28-11-generic'
CC [M] /home/kad/ipp2p/ipt_ipp2p.o
/home/kad/ipp2p/ipt_ipp2p.c: In function قmatchق:
/home/kad/ipp2p/ipt_ipp2p.c:358: error: قconst struct sk_buffق has no member named قnhق
/home/kad/ipp2p/ipt_ipp2p.c: At top level:
/home/kad/ipp2p/ipt_ipp2p.c:519: warning: initialization from incompatible pointer type
/home/kad/ipp2p/ipt_ipp2p.c:520: warning: initialization from incompatible pointer type
/home/kad/ipp2p/ipt_ipp2p.c: In function قinitق:
/home/kad/ipp2p/ipt_ipp2p.c:527: error: implicit declaration of function قipt_register_matchق
/home/kad/ipp2p/ipt_ipp2p.c: In function قfiniق:
/home/kad/ipp2p/ipt_ipp2p.c:532: error: implicit declaration of function قipt_unregister_matchق
make[2]: *** [/home/kad/ipp2p/ipt_ipp2p.o] Error 1
make[1]: *** [_module_/home/kad/ipp2p] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.28-11-generic'
make: *** [modules] Error 2

i try sudo make and without sudo "make" same error
i install linux-header and linux-source and same error why?
my distro = Ubuntu

Thanks
 
Old 12-19-2009, 02:38 AM   #2
mkp
Member
 
Registered: Jul 2008
Posts: 57

Rep: Reputation: 15
See your ipp2p Makefile, in my case i changed this line like this - IPTABLES_SRC = $(wildcard /usr/lib/iptables-$(IPTVER)), before was IPTABLES_SRC = $(wildcard /usr/src/iptables-$(IPTVER)). You need to now where is your kernel and iptables source.
 
Old 12-19-2009, 06:14 AM   #3
moekad
Member
 
Registered: Feb 2009
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by mkp View Post
See your ipp2p Makefile, in my case i changed this line like this - IPTABLES_SRC = $(wildcard /usr/lib/iptables-$(IPTVER)), before was IPTABLES_SRC = $(wildcard /usr/src/iptables-$(IPTVER)). You need to now where is your kernel and iptables source.
hey
thanks for the reply

i try to do:
locate iptables.h
/usr/src/linux-headers-2.6.28-11-generic/include/config/ip/nf/iptables.h
/usr/src/linux-headers-2.6.28-11-generic/include/config/ip6/nf/iptables.h

and my kernal :
at:
/usr/src/linux-headers-2.6.28-11

so i kept it at:
IPTABLES_SRC = $(wildcard /usr/src/iptables-$(IPTVER))
having same error! any clue?
and i did at last:
$(CC) -shared -o libipt_ipp2p.so libipt_ipp2p.o


i try:
IPTABLES_SRC = $(wildcard /usr/src/linux-headers-2.6.28-11-generic/iptables-$(IPTVER))
and for kernel
KERNEL_SRC = /usr/src/linux-headers-2.6.28-11-generic
it give me :
Makefile:36: You need to install iptables sources and maybe set IPTABLES_SRC
gcc -O3 -Wall -DIPTABLES_VERSION=\"1.4.1.1\" -I/include -fPIC -c libipt_ipp2p.c
libipt_ipp2p.c:9:22: error: iptables.h: No such file or directory
libipt_ipp2p.c:67: warning: قstruct ipt_entry_matchق declared inside parameter list
libipt_ipp2p.c:67: warning: its scope is only this definition or declaration, which is probably not what you want
libipt_ipp2p.c: In function قinitق:
libipt_ipp2p.c:69: error: dereferencing pointer to incomplete type
libipt_ipp2p.c: At top level:
libipt_ipp2p.c:81: warning: قstruct ipt_entry_matchق declared inside parameter list
libipt_ipp2p.c: In function قparseق:
libipt_ipp2p.c:83: error: dereferencing pointer to incomplete type
libipt_ipp2p.c:88: warning: implicit declaration of function قexit_errorق
libipt_ipp2p.c:88: error: قPARAMETER_PROBLEMق undeclared (first use in this function)
libipt_ipp2p.c:88: error: (Each undeclared identifier is reported only once
libipt_ipp2p.c:88: error: for each function it appears in.)
libipt_ipp2p.c: In function قfinal_checkق:
libipt_ipp2p.c:308: error: قPARAMETER_PROBLEMق undeclared (first use in this function)
libipt_ipp2p.c: At top level:
libipt_ipp2p.c:317: warning: قstruct ipt_entry_matchق declared inside parameter list
libipt_ipp2p.c: In function قprintق:
libipt_ipp2p.c:319: error: dereferencing pointer to incomplete type
libipt_ipp2p.c: At top level:
libipt_ipp2p.c:347: warning: قstruct ipt_entry_matchق declared inside parameter list
libipt_ipp2p.c: In function قsaveق:
libipt_ipp2p.c:349: error: dereferencing pointer to incomplete type
libipt_ipp2p.c: At top level:
libipt_ipp2p.c:376: error: variable قipp2pق has initializer but incomplete type
libipt_ipp2p.c:378: error: unknown field قnextق specified in initializer
libipt_ipp2p.c:378: warning: excess elements in struct initializer
libipt_ipp2p.c:378: warning: (near initialization for قipp2pق)
libipt_ipp2p.c:379: error: unknown field قnameق specified in initializer
libipt_ipp2p.c:379: warning: excess elements in struct initializer
libipt_ipp2p.c:379: warning: (near initialization for قipp2pق)
libipt_ipp2p.c:380: error: unknown field قversionق specified in initializer
libipt_ipp2p.c:380: warning: excess elements in struct initializer
libipt_ipp2p.c:380: warning: (near initialization for قipp2pق)
libipt_ipp2p.c:381: error: unknown field قsizeق specified in initializer
libipt_ipp2p.c:381: warning: implicit declaration of function قIPT_ALIGNق
libipt_ipp2p.c:381: warning: excess elements in struct initializer
libipt_ipp2p.c:381: warning: (near initialization for قipp2pق)
libipt_ipp2p.c:382: error: unknown field قuserspacesizeق specified in initializer
libipt_ipp2p.c:382: warning: excess elements in struct initializer
libipt_ipp2p.c:382: warning: (near initialization for قipp2pق)
libipt_ipp2p.c:383: error: unknown field قhelpق specified in initializer
libipt_ipp2p.c:383: warning: excess elements in struct initializer
libipt_ipp2p.c:383: warning: (near initialization for قipp2pق)
libipt_ipp2p.c:384: error: unknown field قinitق specified in initializer
libipt_ipp2p.c:384: warning: excess elements in struct initializer
libipt_ipp2p.c:384: warning: (near initialization for قipp2pق)
libipt_ipp2p.c:385: error: unknown field قparseق specified in initializer
libipt_ipp2p.c:385: warning: excess elements in struct initializer
libipt_ipp2p.c:385: warning: (near initialization for قipp2pق)
libipt_ipp2p.c:386: error: unknown field قfinal_checkق specified in initializer
libipt_ipp2p.c:386: warning: excess elements in struct initializer
libipt_ipp2p.c:386: warning: (near initialization for قipp2pق)
libipt_ipp2p.c:387: error: unknown field قprintق specified in initializer
libipt_ipp2p.c:387: warning: excess elements in struct initializer
libipt_ipp2p.c:387: warning: (near initialization for قipp2pق)
libipt_ipp2p.c:388: error: unknown field قsaveق specified in initializer

when i specify in MAKEFILE

IPTABLES_SRC = $(wildcard /usr/src/linux-headers-2.6.28-11-generic/include/config/ip/nf/iptables.h)
then do make give me :
gcc -O3 -Wall -DIPTABLES_VERSION=\"1.4.1.1\" -I/usr/src/linux-headers-2.6.28-11-generic/include/config/ip/nf/iptables.h/include -fPIC -c libipt_ipp2p.c
cc1: error: /usr/src/linux-headers-2.6.28-11-generic/include/config/ip/nf/iptables.h/include: Not a directory
make: *** [libipt_ipp2p.so] Error 1

thx

Last edited by moekad; 12-19-2009 at 06:37 AM.
 
Old 12-19-2009, 08:02 AM   #4
mkp
Member
 
Registered: Jul 2008
Posts: 57

Rep: Reputation: 15
Ok, what i did, i use gentoo and i downloaded ipp2p in my /tmp, decompress and go to check where is my iptables. It was in /lib/iptables, i'm not search for iptables.h, only run whereis iptables. Then i edit Makefile how to show in previous post and run make. That's all. I have stupid question, do you have iptables installed? If you have, i think you look in wrong place, sorry if i'm wrong.

etc. What do you want to block exactly? Web sites or trackers?

Last edited by mkp; 12-19-2009 at 08:05 AM.
 
Old 12-19-2009, 06:53 PM   #5
moekad
Member
 
Registered: Feb 2009
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by mkp View Post
Ok, what i did, i use gentoo and i downloaded ipp2p in my /tmp, decompress and go to check where is my iptables. It was in /lib/iptables, i'm not search for iptables.h, only run whereis iptables. Then i edit Makefile how to show in previous post and run make. That's all. I have stupid question, do you have iptables installed? If you have, i think you look in wrong place, sorry if i'm wrong.

etc. What do you want to block exactly? Web sites or trackers?
heys
whereis iptables
iptables: /usr/src/iptables/iptables /usr/src/iptables/iptables.o /usr/src/iptables/iptables.8 /usr/src/iptables/iptables.c /usr/src/iptables/iptables.xslt /usr/src/iptables-1.4.3.2/iptables /usr/src/iptables-1.4.3.2/iptables.o /usr/src/iptables-1.4.3.2/iptables.8 /usr/src/iptables-1.4.3.2/iptables.c /usr/src/iptables-1.4.3.2/iptables.xslt /sbin/iptables /usr/local/sbin/iptables /usr/include/iptables.h /usr/share/man/man8/iptables.8.gz

:P lol
well i want to block bittorent =) but i think i find a way to block via squid but i was curious to know how to do it with iptables now i specify and i got new error:
///////////
make -C /lib/modules/2.6.28-11-generic/build SUBDIRS=/usr/src/ipp2p-0.8.2 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.28-11-generic'

WARNING: Symbol version dump /usr/src/linux-headers-2.6.28-11-generic/Module.symvers
is missing; modules will have no dependencies and modversions.

CC [M] /usr/src/ipp2p-0.8.2/ipt_ipp2p.o
In file included from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /usr/src/ipp2p-0.8.2/ipt_ipp2p.c:4:
include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory
include/linux/mmzone.h:256:5: warning: "MAX_NR_ZONES" is not defined
In file included from include/linux/gfp.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /usr/src/ipp2p-0.8.2/ipt_ipp2p.c:4:
include/linux/mmzone.h:277: error: قMAX_NR_ZONESق undeclared here (not in a function)
In file included from include/linux/scatterlist.h:6,
from /usr/src/linux-headers-2.6.28-11-generic/arch/x86/include/asm/dma-mapping.h:9,
from include/linux/dma-mapping.h:57,
from include/linux/dmaengine.h:29,
from include/linux/skbuff.h:29,
from include/linux/if_ether.h:120,
from include/linux/netdevice.h:29,
from include/linux/netfilter/x_tables.h:174,
from /usr/src/ipp2p-0.8.2/ipt_ipp2p.c:8:
include/linux/mm.h:437:63: warning: "NR_PAGEFLAGS" is not defined
include/linux/mm.h:485:62: warning: "NR_PAGEFLAGS" is not defined
make[2]: *** [/usr/src/ipp2p-0.8.2/ipt_ipp2p.o] Error 1
make[1]: *** [_module_/usr/src/ipp2p-0.8.2] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.28-11-generic'
make: *** [ipt_ipp2p.ko] Error 2
////////////
i think there's some module lost lol Module.symvers
that's great for now eheh
t.c. =)
 
Old 12-19-2009, 06:56 PM   #6
moekad
Member
 
Registered: Feb 2009
Posts: 64

Original Poster
Rep: Reputation: 15
i've installed the layer7 protocol try:
iptables -t filter -A FORWARD -m layer7 --l7proto bittorrent -j DROP
iptables: No chain/target/match by that name.
why? have u try layer7 to installed it ?
i try to make sure layer7 is on:
iptables -A FORWARD -m layer7
iptables v1.4.3.2: LAYER7 match: You must specify `--l7proto'
Try `iptables -h' or 'iptables --help' for more information.

thx
 
Old 12-20-2009, 10:39 AM   #7
mkp
Member
 
Registered: Jul 2008
Posts: 57

Rep: Reputation: 15
It's funny but i can't install L7-filter. But i really can't understand what you want to block. I can block torrent web sites with squid(this is very easy),i can block with iptables to(very easy to), but can't block trackers, they(trackers) used encryption.

etc. I'm still newbie in Linux and my opinion maybe wrong.

Last edited by mkp; 12-20-2009 at 10:40 AM.
 
Old 12-23-2009, 03:51 AM   #8
moekad
Member
 
Registered: Feb 2009
Posts: 64

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by mkp View Post
It's funny but i can't install L7-filter. But i really can't understand what you want to block. I can block torrent web sites with squid(this is very easy),i can block with iptables to(very easy to), but can't block trackers, they(trackers) used encryption.

etc. I'm still newbie in Linux and my opinion maybe wrong.

ya i block it with squid i was forgot about it , btw do you got a link for download videos of tune Squid3 explain all it's config.?
thx
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ipp2p on centos 4.6 uwa45 Linux - Networking 2 12-13-2009 12:04 PM
Problems with ipp2p Mithrilhall Linux - Software 1 07-11-2007 02:26 PM
can't use ipp2p pk_kala Ubuntu 0 03-01-2007 08:10 PM
problems installing ipp2p on debian ALInux Linux - Software 1 12-15-2006 10:00 PM
Problem compiling ipp2p linuxali Linux - Security 1 04-19-2006 10:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration