In der Config von nginx zu filtern, http flood
Einen http-flood auf meinem server nicht so viel Abfragen, aber trotzdem. Abfragen in der log -
95.55.237.3 - - [06/Sep/2012:14:38:23 +0400] "GET /HTTP/1.0" 200 35551 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)" "-" | "-"
93.78.44.25 - - [06/Sep/2012:14:38:23 +0400] "GET /HTTP/1.0" 200 36051 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)" "-" | "-"
46.118.112.3 - - [06/Sep/2012:14:38:23 +0400] "GET /HTTP/1.0" 200 35551 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)" "-" | "-"
Habe ich versucht, dieses Filter in der nginx-config
server {
.....
set $add 1;
set $ban '';
###### Rule 1 ########
if ($http_referer = '-' ) {
set $ban $ban$add;
}
if ($request_uri = '/') {
set $ban $ban$add;
}
if ($http_user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)') {
set $ban $ban$add;
}
if ($ban = 111) {
return 444;
}
######################
......
}
aber noch bot-Abfragen get 200 OK. Könnte jemand helfen?
Du musst angemeldet sein, um einen Kommentar abzugeben.
Versuchen Sie etwas wie die folgenden Richtlinien, um Ihre Konfiguration zu verhindern, dass http-flooding:
Sehen http://nginx.org/en/docs/http/ngx_http_limit_conn_module.html und http://nginx.org/en/docs/http/ngx_http_limit_req_module.html für mehr info
Gibt es alle der folgenden Richtlinie http://nginx.org/en/docs/http/ngx_http_core_module.html#limit_rate
HINWEIS: http://www.botsvsbrowsers.com/details/504401/index.html sagt das über user-agent ist nicht eine bekannte bot
Sie können auch blockieren bestimmte IP, als zusätzliche Maßnahme.
Oder setzen Sie blockierten IPs in separate Datei
blockedips.conf
Könnte man auch blockieren bestimmte Land
GeoIP.dat heruntergeladen werden kann http://dev.maxmind.com/geoip/geoip2/geolite2/ (ich bin nicht in Verbindung mit maxmind)