I'm using docker swarm and I have an http service that redirects traffic from traefik to an nginx container. Inside the nginx config file i have this:
real_ip_header X-Forwarded-For; set_real_ip_from traefik_proxy;
And of course i can ping it:
/ # ping traefik_proxy PING traefik_proxy (10.0.27.110): 56 data bytes 64 bytes from 10.0.27.110: seq=0 ttl=64 time=0.100 ms
But.... nginx logs still show:
10.0.27.120 - - [26/Jun/2020:18:08:00 +0000] "GET /wp-content/upload.... Notice is not the same IP as the ping one, but still not the user IP.
How can I fix it? Thanks!