Nginx/iptables passing ipclient ip

Francis Daly francis at
Fri Nov 29 23:02:53 UTC 2013

On Fri, Nov 29, 2013 at 05:44:41PM -0500, Todd at VRG wrote:

Hi there,

> nginx is forwarding traffic to webservers..

> proxy_set_header X-Forwarded-For $remote_addr;

> the ip address I still see in the logs is the eth0 = internal_ ip

Using tcpdump, or otherwise, watch the request going from nginx to the
web server. Does is have what you expect to see in the X-Forwarded-For:
header? If so, nginx is doing all it can do; you must configure the web
server to make use of that header value instead of the address that it
actually sees the connection coming from. That web server documentation
should say how to do that.

Francis Daly        francis at

More information about the nginx mailing list