]> git.openstreetmap.org Git - chef.git/commitdiff
Add fail2ban block for repeated timeouts on the trackpoints API call
authorTom Hughes <tom@compton.nu>
Wed, 24 Jan 2024 08:31:24 +0000 (08:31 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 24 Jan 2024 08:31:24 +0000 (08:31 +0000)
cookbooks/web/recipes/frontend.rb

index 6c1f0f761f321a2df84a4b071790bd8d59a9af6c..84923ee8904a09380d863883a3f87a3300695e7d 100644 (file)
@@ -75,6 +75,16 @@ fail2ban_jail "apache-request-timeout" do
   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