X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/4d0f0d5a2c8841d2e7e4553f359bc3322512e6e8..5fa9775ad91ab75137f851ac2663adeb8518ee99:/cookbooks/web/recipes/frontend.rb diff --git a/cookbooks/web/recipes/frontend.rb b/cookbooks/web/recipes/frontend.rb index 44aa0cd5b..ec7ce92f5 100644 --- a/cookbooks/web/recipes/frontend.rb +++ b/cookbooks/web/recipes/frontend.rb @@ -75,6 +75,28 @@ 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] + bantime "12h" + findtime "30m" +end + +fail2ban_filter "apache-notes-search" do + failregex '^ .* "GET /api/0\.6/notes/search\?q=abcde&.*$' +end + +fail2ban_jail "apache-notes-search" do + filter "apache-notes-search" + logpath "/var/log/apache2/access.log" + ports [80, 443] +end + if %w[database_offline database_readonly].include?(node[:web][:status]) service "rails-jobs@mailers" do action :stop