openstack loadbalancer listener create --name foo-lb1-tcp-80 --protocol TCP --protocol-port 80 foo-lb1 openstack loadbalancer pool create --name foo-lb1-proxy-pool --lb-algorithm ROUND_ROBIN --listener foo-lb1-tcp-80 --protocol PROXY openstack loadbalancer member create --subnet-id foo-subnet --address 10.0.1.13 --protocol-port 80 foo-lb1-proxy-pool # check whather http_realip_module is available nginx -V 2>&1 | grep -- 'http_realip_module' # configure nginx cat /etc/nginx/sites-enabled/default ... server { listen 80 default_server proxy_protocol; set_real_ip_from 10.0.1.17; # incomming proxy IP #set_real_ip_from 192.168.1.0/24; real_ip_header proxy_protocol; ... cat /etc/nginx/nginx.conf ... http { proxy_set_header X-Real-IP $proxy_protocol_addr; proxy_set_header X-Forwarded-For $proxy_protocol_addr; ...
Links
https://docs.nginx.com/nginx/admin-guide/load-balancer/using-proxy-protocol/
https://www.scaleway.com/en/docs/configure-proxy-protocol-with-a-load-balancer/