Poulpatine Posted February 24, 2006 Share Posted February 24, 2006 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 More sharing options...
lmarin Posted February 24, 2006 Share Posted February 24, 2006 Dans le genre, regarde du coté de Mangle ( si je me trompe pas... ) Link to comment Share on other sites More sharing options...
shark_atlantis Posted February 24, 2006 Share Posted February 24, 2006 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 Link to comment Share on other sites More sharing options...
Poulpatine Posted February 24, 2006 Author Share Posted February 24, 2006 Yep merci à vous deux, j'ai pas le temps là mais dés ce soir je jette un coup d'oeil à ça :) Link to comment Share on other sites More sharing options...
theocrite Posted February 24, 2006 Share Posted February 24, 2006 Tu as tc aussi aptitude install iproute et pendant qu'on y est aptitude install tpcquota Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.