Nginx only sees Gateway IP not Client IP

Hi folks,

I have Haproxy on my pfSense Firewall and terminating my Web Servers using http to https offloading my issue is the Gateway IPs are seen in the logs and not Client IPs. I have tried adding option forwardfor in the front end and back ends but still have the same issue i have also added X Forward For header in Nginx side but same Gateway IP.

Would anyone have any ideas?

Thanks.

Are you sure that you’re logging the header on the nginx logs? There is a good documentation about it on this loadbalnacer.org post

Hi,

Thanks for your reply.

I have added X Forward For but still showing Gateway IP.

I see that you need to compile Nginx with --with-http_realip_module issue is i have not compiled it with this i have only installed it. This is a pain.