id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,uname,nginx_version 2,"HttpRealIpModule only seems to work with one trusted proxy, you can't build a list of trusted proxies as only the first one will work",cwjam.com,Ruslan Ermilov,"HttpRealIpModule only seems to work with the first trusted proxy set via set_real_ip_from. Any additional trusted proxies are ignored which contradicts the example at http://wiki.nginx.org/HttpRealIpModule Example 1: If you only supply one trusted proxy everything works as expected. set_real_ip_from proxy_1_IP; real_ip_header X-Forwarded-For; X-Forwarded-For: client1, proxy_1_IP $remote_addr = client1 (which is expected) Example 2: However if you provide a list of trusted proxies, only the first one is applied. set_real_ip_from proxy_1_IP; set_real_ip_from proxy_2_IP; real_ip_header X-Forwarded-For; X-Forwarded-For: client1, proxy_2_IP, proxy_1_IP $remote_addr = proxy_2_IP (which is unexpected) It looks like I'm not the only person to encounter this issue: http://forum.nginx.org/read.php?2,154968,154996 The poster of that thread has supplied a patch (which I have not tested) http://treehou.se/~omar/nginx-0.8.53-xff.patch Thanks, Ciaran",enhancement,closed,minor,,nginx-module,,fixed,"HttpRealIpModule, set_real_ip_from",,Linux #9-Ubuntu SMP Thu Apr 15 04:14:01 UTC 2010 i686 GNU/Linux,"nginx version: nginx/0.7.65 TLS SNI support enabled configure arguments: --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug --with-http_stub_status_module --with-http_flv_module --with-http_ssl_module --with-http_dav_module --with-http_gzip_static_module --with-http_realip_module --with-mail --with-mail_ssl_module --with-ipv6 --add-module=/build/buildd/nginx-0.7.65/modules/nginx-upstream-fair "