From: Tom Hughes Date: Wed, 24 Jan 2024 08:31:24 +0000 (+0000) Subject: Add fail2ban block for repeated timeouts on the trackpoints API call X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/0ceabfe7c18d1929e3dae9730716e24a9694a70e?ds=inline Add fail2ban block for repeated timeouts on the trackpoints API call --- diff --git a/cookbooks/web/recipes/frontend.rb b/cookbooks/web/recipes/frontend.rb index 6c1f0f761..84923ee89 100644 --- a/cookbooks/web/recipes/frontend.rb +++ b/cookbooks/web/recipes/frontend.rb @@ -75,6 +75,16 @@ fail2ban_jail "apache-request-timeout" do ports [80, 443] end +fail2ban_filter "apache-trackpoints-timeout" do + failregex '^ .* "GET /api/0\.6/trackpoints\?.*" 408 .*$' +end + +fail2ban_jail "apache-trackpoints-timeout" do + filter "apache-trackpoints-timeout" + logpath "/var/log/apache2/access.log" + ports [80, 443] +end + fail2ban_filter "apache-notes-search" do failregex '^ .* "GET /api/0\.6/notes/search\?q=abcde&.*$' end