AWS ELB + nginx real IP address
Just add following lines into your Nginx configuration in http section.
real_ip_header X-Forwarded-For;
set_real_ip_from 0.0.0.0/0;
Written by Bartłomiej Danek
Related protips
3 Responses
Also.. welcome in some fun security exploits.
over 1 year ago
·
@whardier, do you know better solution?
over 1 year ago
·
I think
real_ip_header X-Forwarded-For;
set_real_ip_from 10.0.0.0/8;
set_real_ip_from 172.16.0.0/12;
set_real_ip_from 192.168.0.0/16;
real_ip_recursive on;
(realiprecursive because the ELB might bounce the traffic off more than 1 IP)
And now you can limit the port to a security group of the ELB so noone else can hit it anyway.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Nginx
Authors
reiaguilera
279.4K
jamesdullaghan
90.14K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#