LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 01-07-2005, 06:48 AM   #1
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Rep: Reputation: 15
Exclamation Bandwidth Allocation Script error..


i m playing around with bandwidth allocation script from

http://l7-filter.sourceforge.net/L7-Netfilter-example

after i compile it...there is an error ::

iptables v1.2.11: Couldn't load match 'layer7':/usr/local/lib/iptables/libipt_layer7.so:cannot open shared object file:No such file or directory


May i know what i missed???
Thanks....
 
Old 01-07-2005, 01:19 PM   #2
Supaiku
LQ Newbie
 
Registered: Jan 2005
Location: Colorado
Posts: 8

Rep: Reputation: 0
Looks like it has an iptables dependancy and you don't have it set up right/installed at all or somthing... you should check their docs for somthing like that.
 
Old 01-08-2005, 06:02 AM   #3
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
can i get a more detail guide????
i need it urgently....

i try to find the libipt_layer7.so. , but it seem like no such file or directory in my linux box.

So...any guide ??

Thanks a million......
 
Old 01-08-2005, 06:06 AM   #4
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Have you compiled patched iptables against patched kernel sources?
 
Old 01-08-2005, 06:30 AM   #5
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
yes.i did. i use the latest iptables...iptables-1.2.11


i check the /usr/local/lib/iptables directory, but there is no libipt_layer7.so
is it something miss???
 
Old 01-08-2005, 06:50 AM   #6
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
this is what i get when i patch the layer7

[root@jin linux-2.6.5-1.358]# patch -p1 < iptables-layer7-0.9.1.patch
patching file extensions/.layer7-test
patching file extensions/libipt_layer7.c
patching file extensions/libipt_layer7.man


libipt_layer7.c and libipt_layer7.so is different , right??
so how to change it?
 
Old 01-08-2005, 09:23 AM   #7
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
where i can find libipt_layer7.so???
so can i just create one and then put under the /usr/local/lib/iptables/ directory???
helllllppppppppp...........
 
Old 01-08-2005, 09:54 AM   #8
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
You should iptables-layer7-xx patch to the iptables source, for kernel source you apply kernel-2.6-xx one
The docs says it all.
 
Old 01-08-2005, 10:39 AM   #9
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
it still look like the same..
This is what i did....:

*********************************************************************************
[root@jin iptables-1.2.11]# patch -p1 < iptables-layer7-0.9.1.patch
patching file extensions/.layer7-test
patching file extensions/libipt_layer7.c
patching file extensions/libipt_layer7.man

[root@jin iptables-1.2.11]# chmod +x extensions/.layer7-test

[root@jin iptables-1.2.11]# make KERNEL_DIR=/usr/src/linux-2.6.5-1.358
In file included from /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4.h: 8,
from /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4/ip _tables.h:25,
from include/libiptc/libiptc.h:6,
from include/iptables.h:5,
from extensions/libipt_layer7.c:26:
/usr/src/linux-2.6.5-1.358/include/linux/config.h:6:2: #error including kernel h eader in userspace; use the glibc headers instead!
Extensions found: IPv4:layer7 IPv4:recent IPv6:ah IPv6:esp IPv6:frag IPv6:ipv6he ader IPv6:hbh IPv6:dst IPv6:rt
cc -O2 -Wall -Wunused -I/usr/src/linux-2.6.5-1.358/include -Iinclude/ -DIPTABLES _VERSION=\"1.2.11\" -fPIC -o extensions/libipt_layer7_sh.o -c extensions/libipt _layer7.c
In file included from /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4.h: 8,
from /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4/ip _tables.h:25,
from include/libiptc/libiptc.h:6,
from include/iptables.h:5,
from extensions/libipt_layer7.c:26:
/usr/src/linux-2.6.5-1.358/include/linux/config.h:6:2: #error including kernel h eader in userspace; use the glibc headers instead!
make: *** [extensions/libipt_layer7_sh.o] Error 1

[root@jin iptables-1.2.11]# make install KERNEL_DIR=/usr/src/linux-2.6.5-1.358

cc -O2 -Wall -Wunused -I/usr/src/linux-2.6.5-1.358/include -Iinclude/ -DIPTABLES _VERSION=\"1.2.11\" -fPIC -o extensions/libipt_layer7_sh.o -c extensions/libipt _layer7.c
In file included from /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4.h: 8,
from /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4/ip _tables.h:25,
from include/libiptc/libiptc.h:6,
from include/iptables.h:5,
from extensions/libipt_layer7.c:26:
/usr/src/linux-2.6.5-1.358/include/linux/config.h:6:2: #error including kernel h eader in userspace; use the glibc headers instead!
make: *** [extensions/libipt_layer7_sh.o] Error 1

[root@jin weejin]# ./bandwidthSc4.sh
stopping tc for eth0 failed (was probably already stopped)
stopping tc for eth1 failed (was probably already stopped)
Packets matching "port = 80" will be shaped to 40kbps.
Packets matching "layer7 = ftp" will be shaped to 20kbps.
iptables v1.2.11: Couldn't load match `layer7':/usr/local/lib/iptables/libipt_layer7.so: cannot open shared object file: No such file or directory

Try `iptables -h' or 'iptables --help' for more information.
[ip|eb]tables failed at line 110
tc has now stopped for eth0
tc has now stopped for eth1


*****************************************************************************

I did something wrong????
what are other solutions?
Thanks .......
 
Old 01-08-2005, 11:19 AM   #10
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
ok it doesn't like the kernel headers in /usr/src/linux-2.6.5-1.358
here's what you can try, backup /usr/include/linux/netfilter_ipv4/ip_conntrack.h

cp /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4/ip_conntrack.h /usr/include/linux/netfilter_ipv4/ip_conntrack.h

cp /usr/src/linux-2.6.5-1.358/include/linux/netfilter_ipv4/ipt_layer7.h /usr/include/linux/netfilter_ipv4

then compile iptables again, run make without KERNEL_DIR=/usr/src/linux-2.6.5-1.358

if that doesnt work, copy the file back and get an older version of the layer7 patch
 
Old 01-08-2005, 11:42 AM   #11
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
the error is still the same
This is what it show after make command:

[root@jin iptables-1.2.11]# make
In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:52,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_SNAT.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_tcp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:68,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_SNAT.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_ftp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:69,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_SNAT.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_irc.h:17:2: #error Only in kernel.
In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:52,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_SAME.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_tcp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:68,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_SAME.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_ftp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:69,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_SAME.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_irc.h:17:2: #error Only in kernel.
In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:52,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_REDIRECT.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_tcp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:68,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_REDIRECT.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_ftp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:69,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_REDIRECT.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_irc.h:17:2: #error Only in kernel.
In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:52,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_NETMAP.c:12:
/usr/include/linux/netfilter_ipv4/ip_conntrack_tcp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:68,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_NETMAP.c:12:
/usr/include/linux/netfilter_ipv4/ip_conntrack_ftp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:69,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_NETMAP.c:12:
/usr/include/linux/netfilter_ipv4/ip_conntrack_irc.h:17:2: #error Only in kernel.
In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:52,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_MASQUERADE.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_tcp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:68,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_MASQUERADE.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_ftp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:69,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_MASQUERADE.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_irc.h:17:2: #error Only in kernel.
In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:52,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_DNAT.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_tcp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:68,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_DNAT.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_ftp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:69,
from /usr/include/linux/netfilter_ipv4/ip_nat_rule.h:3,
from extensions/libipt_DNAT.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_irc.h:17:2: #error Only in kernel.
In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:52,
from extensions/libipt_state.c:8:
/usr/include/linux/netfilter_ipv4/ip_conntrack_tcp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:68,
from extensions/libipt_state.c:8:
/usr/include/linux/netfilter_ipv4/ip_conntrack_ftp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:69,
from extensions/libipt_state.c:8:
/usr/include/linux/netfilter_ipv4/ip_conntrack_irc.h:17:2: #error Only in kernel.
In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:52,
from extensions/libipt_conntrack.c:12:
/usr/include/linux/netfilter_ipv4/ip_conntrack_tcp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:68,
from extensions/libipt_conntrack.c:12:
/usr/include/linux/netfilter_ipv4/ip_conntrack_ftp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:69,
from extensions/libipt_conntrack.c:12:
/usr/include/linux/netfilter_ipv4/ip_conntrack_irc.h:17:2: #error Only in kernel.
In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:52,
from extensions/libipt_connlimit.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_tcp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:68,
from extensions/libipt_connlimit.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_ftp.h:5:2: #error Only in kernel.In file included from /usr/include/linux/netfilter_ipv4/ip_conntrack.h:69,
from extensions/libipt_connlimit.c:9:
/usr/include/linux/netfilter_ipv4/ip_conntrack_irc.h:17:2: #error Only in kernel.
Extensions found:
sed -e '/@MATCH@/ r extensions/libipt_matches.man' -e '/@TARGET@/ r extensions/libipt_targets.man' iptables.8.in >iptables.8


So ...what i can do now??
 
Old 01-08-2005, 11:53 AM   #12
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
using the older version is also facing the same problem.....


i am
 
Old 01-08-2005, 12:13 PM   #13
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
which distro are you using?
 
Old 01-08-2005, 12:29 PM   #14
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
fedora core 2
 
Old 01-08-2005, 09:26 PM   #15
joirnange
Member
 
Registered: Dec 2004
Distribution: Fedora
Posts: 88

Original Poster
Rep: Reputation: 15
anyone can help me to solve this problem???

iptables v1.2.11: Couldn't load match `layer7':/usr/local/lib/iptables/libipt_layer7.so: cannot open shared object file: No such file or directory
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
memory allocation error l00zer Linux - Software 2 09-09-2005 11:43 PM
*ERROR* mtrr allocation failed (-22) nemesi Slackware 1 10-22-2004 04:55 AM
ERROR => OUT_OF_MEMORY Internal memory allocation error FarrelO Linux - Newbie 0 06-03-2004 11:04 AM
Bandwidth Allocation in Squid bally Linux - General 1 02-25-2004 10:37 PM
bandwidth allocation by user wise and ip wise basbosco Linux - Networking 1 11-12-2003 03:54 AM


All times are GMT -5. The time now is 02:36 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration