| 218 | |
| 219 | |
| 220 | = Slowing Abusive Parallel Downloading = |
| 221 | |
| 222 | There are modules that allow you to do rate limiting within the webserver, but if you have a machine using IPTables, you can limit a given IP address to only 5 connections at once using: |
| 223 | |
| 224 | {{{ |
| 225 | -A INPUT -p tcp -m tcp --dport 80 --tcp-flags FIN,SYN,RST,ACK SYN -m connlimit --connlimit-above 5 --connlimit-mask 32 -j REJECT --reject-with tcp-reset |
| 226 | }}} |
| 227 | |
| 228 | You can also set limits per IP block by reducing `--connlimit-mask`. Use `--connlimit-mask=24` for a 256 IP address block. |
| 229 | |