Request limits define the validation criteria for incoming requests by enforcing size limits on HTTP request header fields. The requests that have fields larger than the specified maximums are dropped. Properly configured limits mitigate buffer overflow exploits, preventing Denial of Service (DoS) attacks.
Request Limits are enabled by default, requests that exceed the specified length are assumed buffer overflow attacks. The defaults are normally appropriate, but you might choose to change one or more of the default values under certain conditions.
Steps to Configure Request Limits
- Go to the SECURITY POLICIES > Request Limits page.
- Select the policy from the Policy Name drop-down list for which you want to modify request limits settings.
- In the Request Limits section, specify values for the following fields:
- Enable Request Limits - When set to Yes, size limit checks are enforced on request headers.
- Values: Yes, No
- Recommended: Yes
- Max Request Length - Enter the maximum allowable request length. This includes the Request-Line and all HTTP request headers (for example, User Agent, Cookies, Referer etc.) The request length limit does not include the request body, which is typically present for POST requests. Any request, whose length exceeds this limit, will be denied.
- Range: 1 byte to 65536 bytes.
- Recommended: 32768 bytes
- Max Request Line Length – Enter the maximum allowable length for the request line. The request line consists of the method, the URL (including any query strings) and the HTTP version. Example:
GET /index.cgi?page=home HTTP/1.1
In the above request line, GET is the method, /index.cgi?page=home is the URL and HTTP/1.1 is the version. The length of the entire line is considered when checking for request line length.- Range: 1 byte to 65536 bytes.
- Recommended: 4096 bytes
- Max URL Length – Enter the maximum allowable URL length including the query string portion of the URL.
- Range: 1 byte to 128 kilobytes. No value (empty) implies unlimited.
- Recommended: 4096 bytes
- Max Query Length – Enter the maximum allowable length for the query string portion of the URL.
- Range: 1 byte to 60000 bytes. No value (empty) implies unlimited.
- Recommended: 4096 bytes
- Max Number of Cookies – Enter the maximum number of cookies to be allowed.
- Range: 1 to 1024. If no value is provided or if the field is left empty, it indicates unlimited value.
- Recommended: 40
- Max Cookie Name Length – Enter the maximum allowable length for cookie name.
- Range: 1 byte to 1024 bytes. No value (empty) implies unlimited.
- Recommended: 64 bytes
- Max Cookie Value Length – Enter the maximum allowable length for a cookie value. Requests with cookie values that are larger than the defined setting are denied.
- Range: 1 byte to 32768 bytes. No value (empty) implies unlimited.
- Recommended: 4096 bytes
- Max Number of Headers – Enter the maximum number of headers in a request. If there are more headers than this limit in the request, the request is denied.
- Range: 1 to 40. No value (empty) implies unlimited.
- Recommended: 20
- Max Header Name Length – Enter the maximum allowable length for header name.
- Range: 1 byte to 1024 bytes. No value (empty) implies unlimited.
- Recommended: 32 bytes
Max Header Value Length – Enter the maximum allowable length for any request header. A request header could either be an HTTP protocol header such as "Host," "User-Agent" and so on, or a custom header such as "IIS Translate". A request may contain any number of these headers.
- Range: 1 byte to 64 kilobytes. No value (empty) implies unlimited.
Recommended: 1024 bytes
- Enable Request Limits - When set to Yes, size limit checks are enforced on request headers.
- Click Save
.