Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using NGINX as web server in my VPS, I would like to configure it to block flooding requests. I found HttpLimitReqModule module but I need to avoid send a reply to the user.

I saw the module sends back a 503 http error if the number of requests is higher that the setting. Can I block sending the replies to the user? I would just close the connection.

(I think it is much faster)

Thanks

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#return

Stops processing and returns the specified code to a client. The non-standard code 444 closes a connection without sending a response header.

http://nginx.org/en/docs/http/ngx_http_limit_req_module.html#limit_req_status

syntax: limit_req_status code;
default: limit_req_status 503;

So limit_req_status 444; can help.

share|improve this answer
add comment

Issue a HTTP status 444. No headers will be returned, and the connection will be closed.

"444 No Response (Nginx) Used in Nginx logs to indicate that the server has returned no information to the client and closed the connection (useful as a deterrent for malware)."

http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Server_Error

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.