Add lw08 to the snapshot_shell role and give ftp-master some infra there
[mirror/dsa-puppet.git] / modules / roles / manifests / snapshot_web.pp
index 34d699e..889fa9d 100644 (file)
@@ -23,9 +23,12 @@ class roles::snapshot_web {
        #  99.137.191.34
        # 20181110 crawler
        #  51.15.215.91
+       # 20181222, excessive number of requests
+       #  208.91.68.213
+       # 198.11.128.0/18
        @ferm::rule { 'dsa-snapshot-abusers':
                prio  => "005",
-               rule  => "saddr (61.69.254.110 18.128.0.0/9 3.120.0.0/14 35.156.0.0/14 52.58.0.0/15 99.137.191.34 51.15.215.91) DROP",
+               rule  => "saddr (61.69.254.110 18.128.0.0/9 3.120.0.0/14 35.156.0.0/14 52.58.0.0/15 99.137.191.34 51.15.215.91 208.91.68.213 198.11.128.0/18) DROP",
        }
 
        ensure_packages ( [
@@ -55,6 +58,14 @@ class roles::snapshot_web {
                }
        }
 
+       @ferm::rule { 'dsa-snapshot-connlimit':
+               domain => '(ip ip6)',
+               prio  => "005",
+               rule  => "proto tcp mod state state (NEW) interface ! lo daddr (${ipv4addr} ${ipv6addr})  mod multiport destination-ports (80 443) mod connlimit connlimit-above 3 DROP;
+                         proto tcp mod state state (NEW) interface ! lo                                                dport 6081                 mod connlimit connlimit-above 3 DROP
+                          ",
+       }
+
        # varnish cache
        ###############
        @ferm::rule { 'dsa-nat-snapshot-varnish-v4':