ferm cleanup: bmdb1:dedup
[mirror/dsa-puppet.git] / modules / roles / manifests / snapshot_web.pp
index 582f507..34d699e 100644 (file)
@@ -1,8 +1,33 @@
 class roles::snapshot_web {
        include apache2
-       include apache2::dynamic
        include apache2::rewrite
 
+       # snapshot abusers
+       #  61.69.254.110 - 20180705, mirroring with wget
+       # 20180821 large amount of requests way too fast from some amazon AWS instances
+       #  18.185.157.46
+       #  18.194.174.202
+       #  18.184.181.169
+       #  18.184.5.230
+       #  18.194.137.96
+       #  18.197.147.183
+       #  3.120.39.137
+       #  3.120.41.69
+       #  35.158.129.130
+       #  52.59.199.25
+       #  52.59.228.158
+       #  52.59.245.42
+       #  52.59.253.41
+       #  52.59.71.13
+       # 20180821 mirroring
+       #  99.137.191.34
+       # 20181110 crawler
+       #  51.15.215.91
+       @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",
+       }
+
        ensure_packages ( [
                "libapache2-mod-wsgi",
                ], {
@@ -32,9 +57,6 @@ class roles::snapshot_web {
 
        # varnish cache
        ###############
-       @ferm::rule { 'dsa-snapshot-varnish-v4':
-               rule  => '&SERVICE(tcp, 6081)',
-       }
        @ferm::rule { 'dsa-nat-snapshot-varnish-v4':
                table => 'nat',
                chain => 'PREROUTING',