Skip to contentSkip to conversation

is there any module to track total connection ?

DISCUSSION J. Bakshi 1 participant 3 messages Sep 2, 2009 – Sep 4, 2009

lore
Share & tools
lore

J. Bakshi

author
#0 lore raw

Hello list,

I am searching for a module which can track the total connection at any time and block more incoming packets. Say dropping the new ssh connection if the total ssh connection is already 4. any such module in iptable ?

Thanks

author
#1 lore raw

Any clue ??

Quoted 14 lines · J. Bakshi

Hello list,

I am searching for a module which can track the total connection at any time and block more incoming packets. Say dropping the new ssh connection if the total ssh connection is already 4. any such module in iptable ?

Thanks
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#2 lore raw
In reply to J. Bakshi
Quoted 7 lines · J. Bakshi

Hello list,

I am searching for a module which can track the total connection at any time and block more incoming packets. Say dropping the new ssh connection if the total ssh connection is already 4. any such module in iptable ?

I am answering my own question. the module is connlimit. but it is not working here properly. I have done as

`````````````
# default policy drop for in/out/forward#
###############################

iptables -A INPUT -p tcp --syn -i $IFACE --dport $SSH_PORT -m connlimit
! --connlimit-above 2 -j ACCEPT
``````````````

It should block ssh connection from same source IP if already 2 connections are active from that source. But it is not working as expected. I can log in even 10 ssh with out any problem. Don't know what might be wron. iptables version is v1.4.2-rc1 in suse 11 box. Any clue ?

Thanks