IP-адрес исходного клиента в режиме HAProxy tcp за fortigate
У меня проблема с моей haproxy conf в режиме tcp с send-proxy на nginx: реальный IP установлен для моего шлюза, поэтому у меня не может быть реального IP клиента.
Вот моя топология:
|-- server 1 : keepalived + haproxy | | --- server 3 nginx
Public IP --- FortiGate 192.68.0.254 --- | | --- |
|-- server 2 : keepalived + haproxy | | --- server 4 nginx
вот мой haproxy conf:
global
log /dev/log local0
log /dev/log local0 notice
user haproxy
group haproxy
pidfile /var/run/haproxy-tep.pid
stats socket /var/run/haproxy.stats
stats timeout 2m
maxconn 20480
log /dev/log local5 debug
defaults
log global
option tcplog
option dontlognull
retries 3
option redispatch
timeout client 120s
timeout connect 4s
timeout server 120s
frontend https-in
log global
bind *:443
default_backend https-servers
backend https-servers
mode tcp
balance roundrobin
server nginx1 192.168.50.2:444 check fall 2 inter 1s send-proxy
server nginx2 192.168.50.3:444 check fall 2 inter 1s send-proxy
Это показывает 192.168.0.254 в nginx $remote-adr. Он подключен. Кто-нибудь может мне помочь? Спасибо