Skip to content

Commit

Permalink
Add fail2ban block for repeated timeouts on the trackpoints API call
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Jan 24, 2024
1 parent 1415d24 commit 0ceabfe
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cookbooks/web/recipes/frontend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@
ports [80, 443]
end

fail2ban_filter "apache-trackpoints-timeout" do
failregex '^<ADDR> .* "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 '^<ADDR> .* "GET /api/0\.6/notes/search\?q=abcde&.*$'
end
Expand Down

0 comments on commit 0ceabfe

Please sign in to comment.