Skip to contentSkip to conversation

Connlimit problem k2.6.18.2 , ipt1.3.7

DISCUSSION Bc. Miroslav Kopecek 5 participants 10 messages Mar 9, 2007 – Mar 13, 2007

lore
Share & tools
lore
#0 lore raw

Hi,
I have Debian Sarge 3.1 testing, compiled kernel 2.6.18.2 and actual
iptables 1.3.7 compiled and installed

I need to solve problem with full ip_conntrack on my router. One client with some agressive P2P makes ip_conntack full. So I need to limit connections per that IP address

I can't add connlimit rule? What's wrong? Any suggestion?

-----------------------------------------
iptables -m connlimit -h
connlimit v1.3.7 options:
[!] --connlimit-above n match if the number of existing tcp
connections is (not) above n
--connlimit-mask n group hosts using mask

-----------------------------------------

RouterBM:/home/kopecek# iptables -A FORWARD -p tcp -s 10.88.99.71 -m
connlimit --connlimit-above 300 --connlimit-mask 32  -j REJECT --reject-with
tcp-reset
iptables: No chain/target/match by that name
RouterBM:/home/kopecek# iptables -A FORWARD -p tcp -m connlimit
--connlimit-above 300 --connlimit-mask 32  -j REJECT --reject-with tcp-reset
iptables: No chain/target/match by that name
RouterBM:/home/kopecek# iptables -A FORWARD -p tcp -m connlimit
--connlimit-above 300 --connlimit-mask 32  -j DROP
iptables: No chain/target/match by that name
#1 lore raw
Quoted 1 line · Bc. Miroslav Kopecek

Hi,

Hi,

Quoted 6 lines

I have Debian Sarge 3.1 testing, compiled kernel 2.6.18.2 and actual
iptables 1.3.7 compiled and installed

I need to solve problem with full ip_conntrack on my router. One client with some agressive P2P makes ip_conntack full. So I need to limit connections per that IP address

Have you tried that :

http://www.ipp2p.org/docu_en.html

Signature · 5 lines
Franck Joncourt
http://www.debian.org
http://smhteam.info/wiki/
GPG server : pgpkeys.mit.edu
Fingerprint : C10E D1D0 EF70 0A2A CACF  9A3C C490 534E 75C0 89FE
#3 lore raw
In reply to Bc. Miroslav Kopecek

Hello,

Quoted 10 lines · Bc. Miroslav Kopecek

I can't add connlimit rule? What's wrong? Any suggestion?

-----------------------------------------
iptables -m connlimit -h
connlimit v1.3.7 options:
[!] --connlimit-above n match if the number of existing tcp
connections is (not) above n
--connlimit-mask n group hosts using mask

Quoted 5 lines

-----------------------------------------

RouterBM:/home/kopecek# iptables -A FORWARD -p tcp -s 10.88.99.71 -m
connlimit --connlimit-above 300 --connlimit-mask 32  -j REJECT --reject-with
tcp-reset
iptables: No chain/target/match by that name

Your kernel probably does not support the connlimit match. The connlimit match is not part of the standard kernel. It used to be included as a kernel patch in the patch-o-matic-ng, but has been removed from the daily snapshots since 2006/07/26.

#4 lore raw
Quoted 16 lines · Pascal Hambourg
Quoted 9 lines

I can't add connlimit rule? What's wrong? Any suggestion?

-----------------------------------------
iptables -m connlimit -h
connlimit v1.3.7 options:
[!] --connlimit-above n match if the number of existing tcp
connections is (not) above n
--connlimit-mask n group hosts using mask

Quoted 6 lines

-----------------------------------------

RouterBM:/home/kopecek# iptables -A FORWARD -p tcp -s 10.88.99.71 -m
connlimit --connlimit-above 300 --connlimit-mask 32  -j REJECT
--reject-with
tcp-reset
iptables: No chain/target/match by that name
Quoted 4 lines

Your kernel probably does not support the connlimit match. The connlimit match is not part of the standard kernel. It used to be included as a kernel patch in the patch-o-matic-ng, but has been removed from the daily snapshots since 2006/07/26.

connlimit is still there (not in pomng though), it's out-of-out-off-tree, so to say. You have to patch pomng, and then patch the kernel *whirl* ...

Jan

#2 lore raw
In reply to Franck Joncourt

ipp2p is only for limiting p2p trafic. I don't want to limit trafic and do trafic shaping for p2p (or block p2p).

I want only to solve problem with ip_conntrack. I need any solution to limit connections per IP address.

Mirek

Quoted 34 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Franck Joncourt
Sent: Friday, March 09, 2007 8:40 PM
To: [email protected]
Subject: Re: Connlimit problem k2.6.18.2 , ipt1.3.7

Quoted 1 line · Bc. Miroslav Kopecek

Hi,

Hi,

Quoted 1 line

I have Debian Sarge 3.1 testing, compiled kernel 2.6.18.2

and actual

Quoted 3 lines

iptables 1.3.7 compiled and installed

I need to solve problem with full ip_conntrack on my router.

One client with

Quoted 1 line

some agressive P2P makes ip_conntack full. So I need to

limit connections

Quoted 1 line

per that IP address

Have you tried that :

http://www.ipp2p.org/docu_en.html

Signature · 5 lines
Franck Joncourt
http://www.debian.org
http://smhteam.info/wiki/
GPG server : pgpkeys.mit.edu
Fingerprint : C10E D1D0 EF70 0A2A CACF  9A3C C490 534E 75C0 89FE
#5 lore raw
In reply to Jan Engelhardt

Hi,
so is any "safer" and "suported" way to limit number of connections per IP
address?

Quoted 46 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jan Engelhardt
Sent: Monday, March 12, 2007 12:27 AM
To: Pascal Hambourg
Cc: [email protected]
Subject: Re: Connlimit problem k2.6.18.2 , ipt1.3.7

Quoted 9 lines · Pascal Hambourg
Quoted 9 lines

I can't add connlimit rule? What's wrong? Any suggestion?

-----------------------------------------
iptables -m connlimit -h
connlimit v1.3.7 options:
[!] --connlimit-above n match if the number of existing tcp
connections is (not) above n
--connlimit-mask n group hosts using mask

Quoted 8 lines
Quoted 6 lines

-----------------------------------------

RouterBM:/home/kopecek# iptables -A FORWARD -p tcp -s 10.88.99.71 -m
connlimit --connlimit-above 300 --connlimit-mask 32  -j REJECT
--reject-with
tcp-reset
iptables: No chain/target/match by that name

Your kernel probably does not support the connlimit match.

The connlimit match

Quoted 1 line

is not part of the standard kernel. It used to be included

as a kernel patch in

Quoted 1 line

the patch-o-matic-ng, but has been removed from the daily

snapshots since

Quoted 1 line

2006/07/26.

connlimit is still there (not in pomng though), it's out-of-out-off-tree,
so to say. You have to patch pomng, and then patch the kernel *whirl* ...

Jan

#6 lore raw

Hi,
nobody can help with limiting maximum number of connection per IP adress?
Is any "supported and official" way to do that?

Mirek

Quoted 68 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bc. Miroslav Kopecek
Sent: Monday, March 12, 2007 9:08 AM
To: [email protected]
Subject: RE: Connlimit problem k2.6.18.2 , ipt1.3.7

Hi,
so is any "safer" and "suported" way to limit number of
connections per IP
address?

Quoted 10 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jan Engelhardt
Sent: Monday, March 12, 2007 12:27 AM
To: Pascal Hambourg
Cc: [email protected]
Subject: Re: Connlimit problem k2.6.18.2 , ipt1.3.7

Quoted 12 lines
Quoted 11 lines · Pascal Hambourg
Quoted 11 lines

I can't add connlimit rule? What's wrong? Any suggestion?

-----------------------------------------
iptables -m connlimit -h
connlimit v1.3.7 options:
[!] --connlimit-above n match if the number of existing tcp
connections is (not) above n
--connlimit-mask n group hosts using mask

-----------------------------------------

RouterBM:/home/kopecek# iptables -A FORWARD -p tcp -s 

10.88.99.71 -m

Quoted 24 lines
Quoted 6 lines
Quoted 4 lines

connlimit --connlimit-above 300 --connlimit-mask 32 -j REJECT --reject-with
tcp-reset
iptables: No chain/target/match by that name

Your kernel probably does not support the connlimit match.

The connlimit match

Quoted 1 line

is not part of the standard kernel. It used to be included

as a kernel patch in

Quoted 1 line

the patch-o-matic-ng, but has been removed from the daily

snapshots since

Quoted 1 line

2006/07/26.

connlimit is still there (not in pomng though), it's out-of-out-off-tree,
so to say. You have to patch pomng, and then patch the kernel *whirl* ...

Jan

#7 lore raw

Yes, there are many guys helping to you, think if you want their help.

The solution:
1) Download your kernel and iptables sources.
2) Apply patch-o-matic
a) ./runme --download (connlimit is diferent repository)
b) ./runme connlimit
3) Select the "connlimit" extension into your kernel config.
4) Compile and install
5) Reestart using your new kernel.

If you have "iptables -m connlimit --help", then you don't need to rebuild your iptables. The iptables connlimit extension is included yet, you only need kernel netfilter connlimit extension.

Sugestions:
1) Use a well known working kernel configuration file and only enable
the connlimit extension (plus the predefined and enabled yet).
2) If you don't know how to configure/compile your kernel, this is not
the correct list to answer about this questions (try "devel's lists").
3) Patch-o-matic "./runme --help" command can help and you'll need to
put your kernel source and iptables source directories.
4) connlimit (patch-o-matic) only patch kernel, your iptables 1.3.7 is
prepared with connlimit yet.
5) All distros have their own "kernel compile process", look for it
into your distro documentation.

Last notes:
1) Well known to working configurations are:

      kernel 2.6.19.7 and iptables 1.3.7
      kernel 2.6.18.x and iptables 1.3.7

2) When "connlimit" were included into main stream kernel, will be an
"official way", for now, you'll need to use patch-o-matic and patch your kernel. Take a look into http://www.netfilter.org and read all the documentation to learn what is the "offical" way.

Good luck and enjoy.

Quoted 81 lines · Bc. Miroslav Kopecek

Hi,
nobody can help with limiting maximum number of connection per IP
adress?
Is any "supported and official" way to do that?

Mirek

Quoted 68 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bc. Miroslav Kopecek
Sent: Monday, March 12, 2007 9:08 AM
To: [email protected]
Subject: RE: Connlimit problem k2.6.18.2 , ipt1.3.7

Hi,
so is any "safer" and "suported" way to limit number of
connections per IP
address?

Quoted 10 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jan Engelhardt
Sent: Monday, March 12, 2007 12:27 AM
To: Pascal Hambourg
Cc: [email protected]
Subject: Re: Connlimit problem k2.6.18.2 , ipt1.3.7

Quoted 12 lines
Quoted 11 lines · Pascal Hambourg
Quoted 11 lines

I can't add connlimit rule? What's wrong? Any suggestion?

-----------------------------------------
iptables -m connlimit -h
connlimit v1.3.7 options:
[!] --connlimit-above n match if the number of existing tcp
connections is (not) above n
--connlimit-mask n group hosts using mask

-----------------------------------------

RouterBM:/home/kopecek# iptables -A FORWARD -p tcp -s

10.88.99.71 -m

Quoted 24 lines
Quoted 6 lines
Quoted 4 lines

connlimit --connlimit-above 300 --connlimit-mask 32 -j REJECT --reject-with
tcp-reset
iptables: No chain/target/match by that name

Your kernel probably does not support the connlimit match.

The connlimit match

Quoted 1 line

is not part of the standard kernel. It used to be included

as a kernel patch in

Quoted 1 line

the patch-o-matic-ng, but has been removed from the daily

snapshots since

Quoted 1 line

2006/07/26.

connlimit is still there (not in pomng though), it's out-of-out-off-tree,
so to say. You have to patch pomng, and then patch the kernel *whirl* ...

Jan
--

#8 lore raw

Off course I want help of anybody ;-)

What you wrote is actually what I need! Simple step by step which let me know, what i need to make connlimit works.

So If I understand, my problem is, that I don't have netfilter connlimit extension in my kernel. So I need to use latest patch-o-magic with download and compile connlimit (which is not standard part of it now) patch my kernel and add this extension... Am I right?

Many thanks for help. My English is not very well, so maybe I can't express myself corectlly...
Mirek

Quoted 139 lines

-----Original Message-----
From: ArcosCom Linux User [mailto:[email protected]]
Sent: Tuesday, March 13, 2007 12:33 PM
To: [email protected]
Cc: [email protected]
Subject: RE: Connlimit problem k2.6.18.2 , ipt1.3.7

Yes, there are many guys helping to you, think if you want their help.

The solution:
1) Download your kernel and iptables sources.
2) Apply patch-o-matic
a) ./runme --download (connlimit is diferent repository)
b) ./runme connlimit
3) Select the "connlimit" extension into your kernel config.
4) Compile and install
5) Reestart using your new kernel.

If you have "iptables -m connlimit --help", then you don't need to rebuild
your iptables. The iptables connlimit extension is included yet, you only
need kernel netfilter connlimit extension.

Sugestions:
1) Use a well known working kernel configuration file and
only enable
the connlimit extension (plus the predefined and enabled yet).
2) If you don't know how to configure/compile your kernel,
this is not
the correct list to answer about this questions (try "devel's lists").
3) Patch-o-matic "./runme --help" command can help and
you'll need to
put your kernel source and iptables source directories.
4) connlimit (patch-o-matic) only patch kernel, your
iptables 1.3.7 is
prepared with connlimit yet.
5) All distros have their own "kernel compile process", look for it
into your distro documentation.

Last notes:
1) Well known to working configurations are:

     kernel 2.6.19.7 and iptables 1.3.7
     kernel 2.6.18.x and iptables 1.3.7

2) When "connlimit" were included into main stream kernel,
will be an
"official way", for now, you'll need to use patch-o-matic and patch your kernel. Take a look into http://www.netfilter.org and read all the documentation to learn what is the "offical" way.

Good luck and enjoy.

Quoted 5 lines · Bc. Miroslav Kopecek

Hi,
nobody can help with limiting maximum number of connection per IP
adress?
Is any "supported and official" way to do that?

Quoted 37 lines

Mirek

Quoted 33 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bc. Miroslav Kopecek
Sent: Monday, March 12, 2007 9:08 AM
To: [email protected]
Subject: RE: Connlimit problem k2.6.18.2 , ipt1.3.7

Hi,
so is any "safer" and "suported" way to limit number of
connections per IP
address?

Quoted 17 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jan Engelhardt
Sent: Monday, March 12, 2007 12:27 AM
To: Pascal Hambourg
Cc: [email protected]
Subject: Re: Connlimit problem k2.6.18.2 , ipt1.3.7

Quoted 6 lines · Pascal Hambourg
Quoted 6 lines

I can't add connlimit rule? What's wrong? Any suggestion?

-----------------------------------------
iptables -m connlimit -h
connlimit v1.3.7 options:
[!] --connlimit-above n match if the number of

existing tcp

Quoted 39 lines
Quoted 35 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

connections is (not) above n
--connlimit-mask n group hosts using mask

-----------------------------------------

RouterBM:/home/kopecek# iptables -A FORWARD -p tcp -s

10.88.99.71 -m

Quoted 24 lines
Quoted 6 lines
Quoted 4 lines

connlimit --connlimit-above 300 --connlimit-mask 32 -j REJECT --reject-with
tcp-reset
iptables: No chain/target/match by that name

Your kernel probably does not support the connlimit match.

The connlimit match

Quoted 1 line

is not part of the standard kernel. It used to be included

as a kernel patch in

Quoted 1 line

the patch-o-matic-ng, but has been removed from the daily

snapshots since

Quoted 1 line

2006/07/26.

connlimit is still there (not in pomng though), it's out-of-out-off-tree,
so to say. You have to patch pomng, and then patch the kernel *whirl* ...

Jan
--

#9 lore raw
Quoted 11 lines · Bc. Miroslav Kopecek

Off course I want help of anybody ;-)

What you wrote is actually what I need! Simple step by step which let me know, what i need to make connlimit works.

So If I understand, my problem is, that I don't have netfilter connlimit extension in my kernel. So I need to use latest patch-o-magic with download
and compile connlimit (which is not standard part of it now) patch my kernel
and add this extension... Am I right?

Yes. Patch your kernel and configure it for use "connlimit" extension.

Quoted 150 lines

Many thanks for help. My English is not very well, so maybe I can't express
myself corectlly...
Mirek

Quoted 139 lines

-----Original Message-----
From: ArcosCom Linux User [mailto:[email protected]]
Sent: Tuesday, March 13, 2007 12:33 PM
To: [email protected]
Cc: [email protected]
Subject: RE: Connlimit problem k2.6.18.2 , ipt1.3.7

Yes, there are many guys helping to you, think if you want their help.

The solution:
1) Download your kernel and iptables sources.
2) Apply patch-o-matic
a) ./runme --download (connlimit is diferent repository)
b) ./runme connlimit
3) Select the "connlimit" extension into your kernel config.
4) Compile and install
5) Reestart using your new kernel.

If you have "iptables -m connlimit --help", then you don't need to rebuild
your iptables. The iptables connlimit extension is included yet, you only
need kernel netfilter connlimit extension.

Sugestions:
1) Use a well known working kernel configuration file and
only enable
the connlimit extension (plus the predefined and enabled yet).
2) If you don't know how to configure/compile your kernel,
this is not
the correct list to answer about this questions (try "devel's lists").
3) Patch-o-matic "./runme --help" command can help and
you'll need to
put your kernel source and iptables source directories.
4) connlimit (patch-o-matic) only patch kernel, your
iptables 1.3.7 is
prepared with connlimit yet.
5) All distros have their own "kernel compile process", look for it
into your distro documentation.

Last notes:
1) Well known to working configurations are:

     kernel 2.6.19.7 and iptables 1.3.7
     kernel 2.6.18.x and iptables 1.3.7

2) When "connlimit" were included into main stream kernel,
will be an
"official way", for now, you'll need to use patch-o-matic and patch your kernel. Take a look into http://www.netfilter.org and read all the documentation to learn what is the "offical" way.

Good luck and enjoy.

Quoted 5 lines · Bc. Miroslav Kopecek

Hi,
nobody can help with limiting maximum number of connection per IP
adress?
Is any "supported and official" way to do that?

Quoted 37 lines

Mirek

Quoted 33 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bc. Miroslav Kopecek
Sent: Monday, March 12, 2007 9:08 AM
To: [email protected]
Subject: RE: Connlimit problem k2.6.18.2 , ipt1.3.7

Hi,
so is any "safer" and "suported" way to limit number of
connections per IP
address?

Quoted 17 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jan Engelhardt
Sent: Monday, March 12, 2007 12:27 AM
To: Pascal Hambourg
Cc: [email protected]
Subject: Re: Connlimit problem k2.6.18.2 , ipt1.3.7

Quoted 6 lines · Pascal Hambourg
Quoted 6 lines

I can't add connlimit rule? What's wrong? Any suggestion?

-----------------------------------------
iptables -m connlimit -h
connlimit v1.3.7 options:
[!] --connlimit-above n match if the number of

existing tcp

Quoted 39 lines
Quoted 35 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

connections is (not) above n
--connlimit-mask n group hosts using mask

-----------------------------------------

RouterBM:/home/kopecek# iptables -A FORWARD -p tcp -s

10.88.99.71 -m

Quoted 24 lines
Quoted 6 lines
Quoted 4 lines

connlimit --connlimit-above 300 --connlimit-mask 32 -j REJECT --reject-with
tcp-reset
iptables: No chain/target/match by that name

Your kernel probably does not support the connlimit match.

The connlimit match

Quoted 1 line

is not part of the standard kernel. It used to be included

as a kernel patch in

Quoted 1 line

the patch-o-matic-ng, but has been removed from the daily

snapshots since

Quoted 1 line

2006/07/26.

connlimit is still there (not in pomng though), it's out-of-out-off-tree,
so to say. You have to patch pomng, and then patch the kernel *whirl* ...

Jan
--