A server I run is currently getting spammed... hard...
The IPs are changing every few requests. The server is now returning 403s for anything POSTed at /contact/, but the spammy script/bot is still hitting the server hard–taking up resources and bandwidth...
My NGINX log is showing this like 50 times a minute:
123.456.789.012 - - [Month/Day/2020:13:37:05 -0500] "GET /contact/ HTTP/1.1" 200 5057 "-" "-"
123.456.789.012 - - [Month/Day/2020:13:37:04 -0500] "POST /contact/ HTTP/1.1" 403 580 "https://example.com/contact/" "User Agent String"
1.) How can I block GETs w/ no user agents? (anything that has no referral or user agent "-" "-"
, I'm assuming that's pretty unique to whatever script/bot the spammer is using.
2.) Am I correct in thinking that by blocking the GET, it'll get rid of the POST?
3.) Are there any other ways to handle this flood of requests or do I have to just wait until the attacker gets bored and turns off the script/bot(s)?