From: "Wojciech Maj" Subject: problem with iplimit Date: Fri, 1 Nov 2002 16:28:33 +0100 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: <000e01c281bb$56b27a80$060110ac@localdomain> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000B_01C281C3.B85550C0" Return-path: To: Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org This is a multi-part message in MIME format. ------=_NextPart_000_000B_01C281C3.B85550C0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Hello all There is something strange in debugging output (generated by iplimit = code): (I set --limit-above to 1) =20 When I try to open first connection (ssh connection to 149.156.96.15), = all is ok: =20 >>ipt_iplimit [187]: src=3D172.16.1.6:1714 dst=3D149.156.96.15:22 new >>ipt_iplimit: src=3D172.16.1.6 mask=3D255.255.255.255 connections=3D1 = limit=3D1 match=3Dno when I try to open the second connection (ssh to 213.77.150.238): =20 >>ipt_iplimit [187]: src=3D172.16.1.6:1714 dst=3D149.156.96.15:22 = established >>ipt_iplimit [187]: src=3D172.16.1.6:1726 dst=3D213.77.150.238:22 new >>ipt_iplimit: src=3D172.16.1.6 mask=3D255.255.255.255 connections=3D2 = limit=3D1 match=3Dyes >>ipt_iplimit [187]: src=3D172.16.1.6:1726 dst=3D213.77.150.238:22 gone >>ipt_iplimit [187]: src=3D172.16.1.6:1714 dst=3D149.156.96.15:22 = established >>ipt_iplimit [187]: src=3D172.16.1.6:1726 dst=3D213.77.150.238:22 new >>ipt_iplimit: src=3D172.16.1.6 mask=3D255.255.255.255 connections=3D2 = limit=3D1 match=3Dyes [ok] ..but suddenly, the next SYN (which is not even listed) is accepted. =20 >>ipt_iplimit [187]: src=3D172.16.1.6:1726 dst=3D213.77.150.238:22 gone >>ipt_iplimit [187]: src=3D172.16.1.6:1714 dst=3D149.156.96.15:22 = established >>ipt_iplimit: src=3D172.16.1.6 mask=3D255.255.255.255 connections=3D1 = limit=3D1 match=3Dno =20 ...and second connection is accepted (!). but why, when the first connection is still active? seems like there is something wrong with the algorithm or maybe = something has changed (connection tracking) since the iplimit code was = created (now I am using linux-2.4.20-pre11 with newnat and latest = iptables code). unfortunately I don't know netfilter code at all, so I am not able to = solve it. It should be done by someone, who knows iptables (connection tracking) = code well. I hope somebody will help us. Thanks in advance Wojtek ------=_NextPart_000_000B_01C281C3.B85550C0 Content-Type: text/html; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable
Hello all
 
There is something strange in=20 debugging output (generated by iplimit code):
 
(I set --limit-above to = 1)
 
When I try to open first = connection (ssh=20 connection to 149.156.96.15), all is ok:
 
>>ipt_iplimit [187]: = src=3D172.16.1.6:1714=20 dst=3D149.156.96.15:22 new
>>ipt_iplimit: src=3D172.16.1.6=20 mask=3D255.255.255.255 connections=3D1 limit=3D1 match=3Dno

when I=20 try to open the second connection (ssh to = 213.77.150.238):
 
>>ipt_iplimit [187]: = src=3D172.16.1.6:1714=20 dst=3D149.156.96.15:22 established
>>ipt_iplimit [187]:=20 src=3D172.16.1.6:1726 dst=3D213.77.150.238:22 = new
>>ipt_iplimit:=20 src=3D172.16.1.6 mask=3D255.255.255.255 connections=3D2 limit=3D1=20 match=3Dyes
>>ipt_iplimit [187]: = src=3D172.16.1.6:1726=20 dst=3D213.77.150.238:22 gone
>>ipt_iplimit [187]: = src=3D172.16.1.6:1714=20 dst=3D149.156.96.15:22 established
>>ipt_iplimit [187]:=20 src=3D172.16.1.6:1726 dst=3D213.77.150.238:22 = new
>>ipt_iplimit:=20 src=3D172.16.1.6 mask=3D255.255.255.255 connections=3D2 limit=3D1 = match=3Dyes
[ok]
..but suddenly, the next SYN (which is not even = listed) is=20 accepted.
 
>>ipt_iplimit [187]: = src=3D172.16.1.6:1726=20 dst=3D213.77.150.238:22 gone
>>ipt_iplimit [187]: = src=3D172.16.1.6:1714=20 dst=3D149.156.96.15:22 established
>>ipt_iplimit: = src=3D172.16.1.6=20 mask=3D255.255.255.255 connections=3D1 limit=3D1 = match=3Dno
 
...and second connection is = accepted=20 (!).
but why, when the first connection = is still=20 active?
 
seems like there is something = wrong with =20 the algorithm or maybe something = has=20 changed (connection tracking) since the iplimit code was created = (now I am=20 using linux-2.4.20-pre11 with newnat and latest iptables=20 code).
 
unfortunately I don't know = netfilter code at=20 all, so I am not able to solve it.
It should be done by someone, = who knows=20 iptables (connection tracking) code well.
I hope somebody will help = us.
 
Thanks in advance
 
Wojtek
------=_NextPart_000_000B_01C281C3.B85550C0--