Skip to contentSkip to conversation

limit number of TCP connections.

LARTC Cristiano Soares 3 participants 4 messages Oct 25, 2004 – Oct 26, 2004

lore
Share & tools
lore
#0 lore raw

Hi all. I have a simple question. Is that a way to limit the number os TCP or UDP connection of a single HOST in my network?
For exemple:
I have a host with IP 192.168.1.202 and he is using edonkey, Kazaa, and Bittorrent at the same time, and he also is infected by a virus that opens more than 500 TCP ports at the same time. So, i want to limit that host to be able to open no more then 30 TCP connections at once, so he wouldnt hurt the other users.

Thanks in advance,

Cristiano Soares

#1 lore raw
Quoted 9 lines · Cristiano Soares

Hi all. I have a simple question. Is that a way to limit the number os TCP or UDP connection of a single HOST in my network? For exemple:
I have a host with IP 192.168.1.202 and he is using edonkey, Kazaa, and
Bittorrent at the same time, and he also is infected by a virus that opens more than 500 TCP ports at the same time. So, i want to limit that host to be able to open no more then 30 TCP connections at once, so he wouldnt hurt the other users.
Thanks in advance,
Cristiano Soares

Try connlimit patches from Iptables POM
www.netfilter.org

- Rio.Martin -
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#2 lore raw
In reply to Cristiano Soares

iptables -I FORWARD -s 192.168.1.202 -p tcp --syn -m state --state NEW -m limit --limit 50/s --limit-burst 100 -j ACCEPT
iptables -I FORWARD 2 -s 192.168.1.202 -p tcp --syn -m state --state NEW -j DROP

with udps things are a bit simmilar, except you dont need the --syn

Quoted 22 lines · Rio Martin.
Quoted 9 lines · Cristiano Soares

Hi all. I have a simple question. Is that a way to limit the number os TCP or UDP connection of a single HOST in my network? For exemple:
I have a host with IP 192.168.1.202 and he is using edonkey, Kazaa, and
Bittorrent at the same time, and he also is infected by a virus that opens more than 500 TCP ports at the same time. So, i want to limit that host to be able to open no more then 30 TCP connections at once, so he wouldnt hurt the other users.
Thanks in advance,
Cristiano Soares

Try connlimit patches from Iptables POM
www.netfilter.org

- Rio.Martin -
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

Signature · 4 lines
Bla bla
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#3 lore raw
In reply to Cristiano Soares

Hello George,
Thanks for adding some more infos related to this question.

- Rio.Martin -

Quoted 5 lines · George Alexandru Dragoi

iptables -I FORWARD -s 192.168.1.202 -p tcp --syn -m state --state NEW -m limit --limit 50/s --limit-burst 100 -j ACCEPT
iptables -I FORWARD 2 -s 192.168.1.202 -p tcp --syn -m state --state NEW -j DROP

Quoted 21 lines

with udps things are a bit simmilar, except you dont need the --syn

Quoted 18 lines · Rio Martin.
Quoted 9 lines · Cristiano Soares

Hi all. I have a simple question. Is that a way to limit the number os TCP or UDP connection of a single HOST in my network? For exemple: I have a host with IP 192.168.1.202 and he is using edonkey, Kazaa, and Bittorrent at the same time, and he also is infected by a virus that opens more than 500 TCP ports at the same time. So, i want to limit that host to be able to open no more then 30 TCP connections at once, so he wouldnt hurt the other users.
Thanks in advance,
Cristiano Soares

Try connlimit patches from Iptables POM
www.netfilter.org

- Rio.Martin -
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/