Jump to content

[IPTABLES]Comment limiter la vitesse

Recommended Posts

Salut @ vous :)

Je cherche comment faire, sur iptables, pour limiter la vitesse d'une session TCP par port ou par ip, peut m'importe tant que ça fonctionne, aprés on peut s'arranger :).

J'ai trouvé quelques infos, notamment sur la modification du champ TOS du paquet mais ce n'est pas une technique sûre à 100 %.

Auriez vous une idée ?

Merci beaucu :)

Link to comment
Share on other sites

Consider another example

iptables -A INPUT -p icmp --icmp-type echo-request \

-m limit --limit 1/s -i eth0 -j ACCEPT

The limit feature in iptables specifies the maximum average number of matches to allow per second. You can specify time intervals in the format /second, /minute, /hour, or /day, or you can use abbreviations so that 3/second is the same as 3/s.

In this example, ICMP echo requests are restricted to no more than one per second. When tuned correctly, this feature allows you to filter unusually high volumes of traffic that characterize denial of service (DOS) attacks and Internet worms.

iptables -A INPUT -p tcp --syn -m limit --limit 5/s -i eth0 -j ACCEPT

You can expand on the limit feature of iptables to reduce your vulnerability to certain types of denial of service attack. Here a defense for SYN flood attacks was created by limiting the acceptance of TCP segments with the SYN bit set to no more than five per second.

Source http://www.siliconvalleyccie.com/linux-hn/iptables-intro.htm

J'éspère que c'est ce que tu cherche :cartonrouge:

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...