]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tilecache/recipes/default.rb
Enable fail2ban for tile caches
[chef.git] / cookbooks / tilecache / recipes / default.rb
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_"