4515-nginx-timeout - It is recommended to reset the timeout values for reading client headers and body¶
Rule ID¶
- 4515-nginx-timeout
Category¶
- nginx
Level¶
- info
Compatible Versions¶
- Linux
Description¶
- The
client_header_timeoutandclient_body_timeoutdirectives define how long the server will wait for the client to send headers or a body. If no bytes are received from the client for 60 consecutive seconds, a 408 error is returned.
Scan Frequency¶
- 0 */30 * * *
Theoretical Basis¶
- Setting timeouts for client headers and bodies helps mitigate potential DDOS attacks. By timing out requests, the server can release resources that might be waiting for a body or header.
Risk Items¶
- nginx security
Audit Method¶
- To verify the current settings of the
client_body_timeoutandclient_header_timeoutdirectives, issue the following command. You should also manually check the nginx configuration to see if there are statements located outside the/etc/nginxdirectory. If they do not exist, set the value to the default.
Remediation¶
- Locate the HTTP or server block in the nginx configuration and add the
client_header_timeoutandclient_body_timeoutdirectives to this configuration. The following example sets the timeout to 10 seconds.
Impact¶
- None
Default Value¶
- By default, the timeout control is set to 60 seconds.
References¶
- None
CIS Controls¶
- None