You can reject a TCP connection or HTTP request by using one of the following directives in a
| || |
Closes the connection without a response once a session has been created, but before the HTTP parser has been initialized. These requests still show in your logs.
| || |
Closes the connection without a response at the earliest point, before a session has been created. These requests do not show in your logs.
A reject response closes the connection immediately without sending a response. The client's browser will display a "The connection was reset" error page.
In the following example, we reject requests originating from IP addresses we wish to block:
frontend www bind :80 acl blocked_ip src -f
/etc/hapee-1.6/blocklist.acltcp-request connection reject if blocked_ip default_backend webservers