3 ms·
444 might be quicker, if less fun. https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#return https://nginx.org/en/docs/http/ngx_http_rewrite_module.ht
by mixmastamyk 2y ago
444 might be quicker, if less fun. https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#return https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#...
Wonder how to ban that address permanently just for asking for these urls?
- palsecam 2y ago444 is a (nginx-specific) idea too, indeed. Blocking at the edge (on the CDN) is another, and it would be even quicker ;-) (I use Cloudflare, a Cloudflare worker could be set to answer /wp-login.php or anything, without even reaching my own server.) Wrt. how to ban: an option would be something like fail2ban (https://en.wikipedia.org/wiki/Fail2ban https://en.wikipedia.org/wiki/Fail2ban)
- jmholla 2y ago> Blocking at the edge (on the CDN) is another, and it would be even quicker ;-) (I use Cloudflare, a Cloudflare worker could be set to answer /wp-login.php or anything, without even reaching my own server.) With HTTPS, blocking on the edge requires using a CDN that holds your secret keys. The only way they could block paths is being able to decrypt requests since the path is encrypted. If you trust Cloudflare or someone else to manage your secrets, this will work, but if you are terminating your HTTPS connections, you'll need to handle it with your own infrastructure as people above have.
- sangnoir 2y ago> Wonder how to ban that address permanently just for asking for these urls? fail2ban supports rules based on nginx logs (clients that triggers x 444 responses in y minutes (or y-times) gets banned for n minutes/hours/days)