Config of nginx to filter http flood

前端 未结 3 1614
猫巷女王i
猫巷女王i 2020-12-23 08:52

A have a http flood on my server, not so much queries, but anyway. Queries in log

95.55.237.3 - - [06/Sep/2012:14:38:23 +0400] \"GET / HTTP/1.0\" 200

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-23 09:14

    You could also block specific country

    http{
       geoip_country /usr/share/GeoIP/GeoIP.dat;
        map $geoip_country_code $allowed_country {
            default yes;
            FK no;
            FM no;
            EH no;
        }
    }
    

    GeoIP.dat can be downloaded from http://dev.maxmind.com/geoip/geoip2/geolite2/ (I am not affiliated with maxmind)

提交回复
热议问题