LoadBalancer-->Varnish-->Nginx : Real IP Address
Been scratching my head for a few hours now and wanted to see if anyone can help.
1) I have a load balancer with 6 servers in the back end.
2) The back end servers are Nginx and to get the real IP addresses of the visitors, all I have to do is the following in each Nginx install and I am able to get the real client IP address of each visitor.
setrealip_from 192.168.255.0/24; <– to handle the load balancer IP
3) Now I have installed Varnish in front of each Nginx running on 127.0.0.1 doing caching and for some reason now Nginx doesn't see the real client Ip addresses anymore coming from LoadBalancer --> Varnish --> Nginx
It's printing the following:
192.168.255.9 <-- this should be the real client IP address and not the 192.168 (assuming the load balancer IP address is being printed)
More detailed host address:
Many thank if you can help.
Not too sure.