Skip to contentSkip to conversation

limit connection

DISCUSSION Piotr Holubniak 2 participants 2 messages Oct 1, 2005 – Oct 2, 2005

lore
Share & tools
lore
#0 lore raw

Hello everyone

Is it possisble to limit number of connections which can be established from one IP address? I mean if sender reaches limited number of connections, no more connections can be established from this host, but other host still can connect . I rather think about global limit not for certain IP address.

Regards

PiotrH

#1 lore raw
Quoted 8 lines · Piotr Holubniak

Hello everyone

Is it possisble to limit number of connections which can be established from one IP address?
I mean if sender reaches limited number of connections, no more connections can be established from this host, but other host still can connect . I rather think about global limit not for certain IP address.

try this:

iptables -A FORWARD -p tcp --syn -s $source_ip -o $ext_interface -m connlimit --connlimit-above $number_of_allowed_connections -j REJECT

Marek