]> git.openstreetmap.org Git - chef.git/commitdiff
Enable fail2ban for tile caches
authorTom Hughes <tom@compton.nu>
Sat, 12 Oct 2019 10:54:44 +0000 (11:54 +0100)
committerTom Hughes <tom@compton.nu>
Sat, 12 Oct 2019 10:54:44 +0000 (11:54 +0100)
cookbooks/tilecache/metadata.rb
cookbooks/tilecache/recipes/default.rb

index 20ea55c6e3b8019d75c865f64191e8fe1eb11e98..a2074862414cd9f79d50f1bd680f2ca0af7ca3fa 100644 (file)
@@ -10,3 +10,4 @@ depends           "ssl"
 depends           "squid"
 depends           "nginx"
 depends           "munin"
+depends           "fail2ban"
index f3b8382fbc05e4d851d30d0fddcb22e4af2ef637..4afda5568d3b0b1d3bbea6ac9b0071bd75d5d4a9 100644 (file)
@@ -22,6 +22,7 @@ require "ipaddr"
 include_recipe "ssl"
 include_recipe "squid"
 include_recipe "nginx"
+include_recipe "fail2ban"
 
 package "apache2" do
   action :remove
@@ -135,6 +136,10 @@ template "/etc/logrotate.d/nginx" do
   mode 0o644
 end
 
+fail2ban_jail "squid" do
+  maxretry 1000
+end
+
 tilerenders.each do |render|
   munin_plugin "ping_#{render[:fqdn]}" do
     target "ping_"