Add listen
Select a server:
------
{% for select in selects %}
{{ select.1 }}
{% endfor %}
Note: If you re-configure the master server, the slave server will be re-configured automatically
A "listen" section defines a complete proxy with its frontend and backend parts combined in one section. It is generally useful for TCP-only traffic.
All proxy names must be formed from upper and lower case letters, digits, '-' (dash), '_' (underscore) , '.' (dot) and ':' (colon). ACL names are
case-sensitive, which means that "www" and "WWW" are two different proxies.
Historically, all proxy names could overlap, it just caused troubles in the logs. Since the introduction of content switching, it is mandatory that two
proxies with overlapping capabilities (frontend/backend) have different names. However, it is still permitted that a frontend and a backend share the same
name, as this configuration seems to be commonly encountered.
Name:
{{ input('name', name='listener', title="Name Listener", placeholder="web_80", required='required') }}
IP and Port:
{{ input('ip', placeholder="Any", size='15') }}:
{{ input('listen-port', name='port', title="Port for bind listen", placeholder="8080", size='5', required='required') }}
If the IP-address for the listener is empty, it will listen on all IP addresses.
Start typing IP or press down button. Click on + to add multiple IP-port pairs. If you are using VRRP,
leave the IP field blank. If you assign a VRRP IP, the slave server will not start.
Mode:
{% set values = dict() %}
{% set values = {'http':'http','tcp':'tcp'} %}
{{ select('listen-mode-select', name='mode', values=values, selected='http', required='required', class='force_close') }}
SSL Offloading
Enter name of pem file, or press the "down" button:
{{ input('path-cert-listen', name="cert", placeholder="some_cert.pem", size='39') }}
Disable SSL check
Disable SSL verify on servers
Maxconn:
{{ input('maxconn', value='2000', type="number", title="Fix the maximum number of concurrent connections on a frontend", size='5', required='required') }}
This value should not exceed the global maxconn. Default global maxconn value: 2000
Balance:
{{ select('balance', values=balance_params, selected='roundrobin', required='required', class='force_close') }}
Health check:
{{ select('listener_checks', name='health_check', values=checks, selected='', class='force_close') }}
URI path for checking: {{ input('listener_checks_http_path', name='checks_http_path', value='/', title="URI for checking e.g. /check") }}
Domain name: {{ input('listener_checks_http_domain', name='checks_http_domain', placeholder='domain.com', title="Domain name for checking e.g. domain.com") }}
ACL:
if
{{ select('listener_acl_if', name='acl_if', values=if_values, first='Choose if', class='force_close', disabled=false) }}
value
{{ input('listener_acl_value', name="acl_value") }}
then
{% set values = dict() %}
{% set values = {'2':'Redirect to','3':'Allow','4':'Deny', '6': 'Return', '7': 'Set-header'} %}
{{ select('listener_acl_then', name='acl_then', values=values, first='Choose action', class='force_close', disabled=false) }}
value
{{ input('listener_acl_then_value', name='acl_then_value', title="Required if \'then\' is \'Use backend\' or \'Redirect\', \'Return\', or \'Set-header\'") }}
Web acceleration:
{{ checkbox('compression', title='HTTP compression allows you to shrink the body of a response before it is relayed to a client, which results in using less network bandwidth per request. From a client\'s perspective, this reduces latency.',
value='1', desc='Compression') }}
{{ checkbox('cache', title='Enable cache', value='2', desc='Cache') }}
{{ checkbox('ssl_offloading', title='Enable redirection from HTTP scheme to HTTPS scheme', desc='HTTP->HTTPS') }}
WAF:
{{ checkbox('slow_atack', title='In a Slow POST attack, an attacker begins by sending a legitimate HTTP POST header to a Web server, exactly as they would under normal circumstances. The header specifies the exact size of the message body that will then follow. However, that message body is then sent at an alarmingly low rate – sometimes as slow as 1 byte per approximately two minutes.',
desc='Slow attack') }}
{{ checkbox('ddos', title='DDOS attack protect', desc='DDOS') }}
{{ checkbox('whitelist_checkbox', title='Add whitelist', desc='Whitelist') }}
{{ checkbox('blacklist_checkbox', title='Add blacklist', desc='Blacklist') }}
{{ checkbox('waf', title='Web application firewall', desc='WAF', value='1') }}
{{ checkbox('antibot', title='Unfortunately, a large portion of bots are used for malicious reasons. Their intentions include web scraping, spamming, request flooding, brute forcing, and vulnerability scanning. For example, bots may scrape your price lists so that competitors can consistently undercut you or build a competitive solution using your data. Or they may try to locate forums and comment sections where they can post spam. At other times, they’re scanning your site looking for security weaknesses.',
desc='Antibot', value='1') }}
Enter a blacklist name, or press the "down" button:
{{ input('blacklist-hide-input', size='39', name="blacklist", placeholder="blacklist.lst") }}
Enter a whitelist name, or press the "down" button::
{{ input('whitelist-hide-input', size='39', name="whitelist", placeholder="whitelist.lst") }}
Options:
{{ checkbox('forward_for', title='When HAProxy Enterprise proxies a TCP connection, it overwrites the client\'s source IP address with its own when communicating with the backend server. However, when relaying HTTP messages, it can store the client\'s address in the HTTP header X-Forwarded-For. The backend server can then be configured to read the value from that header to retrieve the client\'s IP address.',
desc='Forward for') }}
{{ checkbox('redispatch', title='In HTTP mode, if a server designated by a cookie is down, clients may
definitely stick to it because they cannot flush the cookie, so they will not
be able to access the service anymore.
Specifying "option redispatch" will allow the proxy to break their
persistence and redistribute them to a working server.
It also allows to retry connections to another server in case of multiple
connection failures. Of course, it requires having "retries" set to a nonzero
value.', desc='Redispatch') }}
{% set values = dict() %}
{% set values = {'Off':'Off','Server only':'Server only','Force close':'Force close','Pretend keep alive':'Pretend keep alive'} %}
{{ select('force_close', values=values, first='Force HTTP close', title='Since HAProxy works in reverse-proxy mode, the servers see its IP address as
their client address. This is sometimes annoying when the client\'s IP address
is expected in server logs. To solve this problem, the well-known HTTP header
"X-Forwarded-For" may be added by HAProxy to all requests sent to the server.
This header contains a value representing the client\'s IP address. Since this
header is always appended at the end of the existing header list, the server
must be configured to always use the last occurrence of this header only. See
the server\'s manual to find how to enable use of this standard header. Note
that only the last occurrence of the header must be used, since it is really
possible that the client has already brought one.', class='force_close') }}
{{ checkbox('cookie', title='To send a client to the same server where they were sent previously in order to reuse a session on that server, you can enable cookie-based session persistence. Add a cookie directive to the backend section and set the cookie parameter to a unique value on each server line.',
desc='Set cookie', value='1') }}
{{ checkbox('options-listen-show', title='Set options manually', desc='Set options') }}
{% set values = dict() %}
{% set values = {'None':'None','rewrite':'rewrite','indirect':'indirect','insert':'insert'} %}
{{ select('rewrite', values=values, first='rewrite/indirect/insert', class='force_close') }}
{{ checkbox('prefix', title='This keyword indicates that instead of relying on a dedicated cookie for the persistence, an existing one will be completed', desc='prefix', value='prefix') }}
{{ checkbox('nocache', title='This option is recommended in conjunction with the insert mode when there is a cache between the client and HAProxy', desc='nocache', value='nocache') }}
{{ checkbox('postonly', title='This option ensures that cookie insertion will only be performed on responses to POST requests', desc='postonly', value='postonly') }}
{{ checkbox('dynamic', title='Activate dynamic cookies. When used, a session cookie is dynamically created for each server', desc='dynamic', value='dynamic') }}
dynamic-cookie-key: {{ input('dynamic-cookie-key', placeholder="your-custom-key") }}
Servers:
{% include 'include/add_servers.html' %}
{{ checkbox('template-listen', name='template', title='Сreate the list of servers from the template', value='template', desc='Server-template') }}
Check:
Custom check params
Default params: inter 2000 rise 2 fall 5
Check
{% set values = dict() %}
{% set values = {'1000':'1000','2000':'2000','3000':'3000'} %}
{{ select('inter-listen', values=values, first='inter', class='force_close') }}
{% set values = dict() %}
{% set values = {'1':'1','2':'2','3':'3'} %}
{{ select('rise-listen', name='rise', values=values, first='rise', class='force_close') }}
{% set values = dict() %}
{% set values = {'4':'4','5':'5','6':'6'} %}
{{ select('fall-listen', name='fall', values=values, first='fall', class='force_close') }}
{{ checkbox('circuit_breaking_listen', name="circuit_breaking", desc='Circuit Breaking', title='Circuit breaker is a design pattern which is used to detect failures and encapsulates the logic of preventing a failure from constantly recurring. The circuit breaker design pattern works much like an electrical circuit breaker which is intended to “trip” or open the circuit when failure is detected.',
value='1') }}
Observe:
{{ select('circuit_breaking_observe', values=observe, class='force_close') }}
error-limit: {{ input('circuit_breaking_error_limit', type='number', value='50', style='width: 50px;') }}
on-error:
{{ select('circuit_breaking_on_error', values=on_error, class='force_close') }}
Show Advanced settings
Hide Advanced settings
Add Listen
Generate config