Skip to contentSkip to conversation

problem with iplimit

DISCUSSION Wojciech Maj 1 participant 1 message Oct 31, 2002 netfilter

lore
Share & tools
lore
#0 lore raw

Hello all

There is something strange in debugging output (generated by iplimit code):

(I set --limit-above to 1)

When I try to open first connection (ssh connection to 149.156.96.15), all is ok:

Quoted 2 lines
Quoted 2 lines

ipt_iplimit [187]: src=172.16.1.6:1714 dst=149.156.96.15:22 new
ipt_iplimit: src=172.16.1.6 mask=255.255.255.255 connections=1 limit=1 match=no

when I try to open the second connection (ssh to 213.77.150.238):

Quoted 8 lines
Quoted 8 lines

ipt_iplimit [187]: src=172.16.1.6:1714 dst=149.156.96.15:22 established ipt_iplimit [187]: src=172.16.1.6:1726 dst=213.77.150.238:22 new
ipt_iplimit: src=172.16.1.6 mask=255.255.255.255 connections=2 limit=1 match=yes

ipt_iplimit [187]: src=172.16.1.6:1726 dst=213.77.150.238:22 gone ipt_iplimit [187]: src=172.16.1.6:1714 dst=149.156.96.15:22 established ipt_iplimit [187]: src=172.16.1.6:1726 dst=213.77.150.238:22 new
ipt_iplimit: src=172.16.1.6 mask=255.255.255.255 connections=2 limit=1 match=yes

[ok]
..but suddenly, the next SYN (which is not even listed) is accepted.

Quoted 3 lines
Quoted 3 lines

ipt_iplimit [187]: src=172.16.1.6:1726 dst=213.77.150.238:22 gone ipt_iplimit [187]: src=172.16.1.6:1714 dst=149.156.96.15:22 established
ipt_iplimit: src=172.16.1.6 mask=255.255.255.255 connections=1 limit=1 match=no

...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