User Tools

Site Tools


wiki:shorewall_rate_limiting_requests

shorewall rate limiting requests

Add the following to your rules file:

# allow http
ACCEPT net $FW tcp 80 - - s:20/min:30
# allow https
ACCEPT net $FW tcp 443 - - s:20/min:30

Make sure you don't have any rule that accepts traffic on these ports before these rules. Shorewall evaluates rules in the order they are listed in the file.

Test with apache benchmark:

ab -n 100 -c 50 https://www.example.org

Number of request per second should be significantly higher without rate limits in place and after will be lower.

Tested on

See also

References

wiki/shorewall_rate_limiting_requests.txt · Last modified: by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki