The working mechanism behind the Proxy Protocol
This section describes how AxoSyslog supports the Proxy Protocol.
The working mechanism behind the Proxy Protocol
When using the Proxy Protocol during load balancing, AxoSyslog detects the information behind connections connected to the load balancer, then parses the injected information and adds the following macros to every message the comes through the connection later on:
-
PROXY_SRCIP
(the source IP of the proxy) -
PROXY_SRCPORT
(the source port of the proxy) -
PROXY_DSTIP
(the destination IP of the proxy) -
PROXY_DSTPORT
(the destination port of the proxy)
Note
Consider the following about macros and headers:
-
When the proxy protocol header is
PROXY UNKNOWN
, no additional macros are added. -
When AxoSyslog cannot parse a proxy protocol header, the connection is closed:
[2020-11-20T17:33:22.189458] PROXY protocol header received; line='PROXYdsfj' [2020-11-20T17:33:22.189475] Error parsing PROXY protocol header; [2020-11-20T17:33:22.189517] Syslog connection closed; fd='13', client='AF_INET(127.0.0.1:51665)', local='AF_INET(0.0.0.0:6666)' [2020-11-20T17:33:22.189546] Freeing PROXY protocol source driver; driver='0x7fffcba5bcf0' [2020-11-20T17:33:22.189600] Closing log transport fd; fd='13'
Note
Originally, the driver supported version 1 of the PROXY protocol (TCP4, TCP6, and TLS connections). PROXY protocol v2 support is available in AxoSyslog version 4.1 and later.
Last modified December 18, 2024: Merge pull request #90 from axoflow/minor-fixes-241218 (68cd7df)