Changes between Initial Version and Version 1 of Ticket #2350, comment 3


Ignore:
Timestamp:
05/12/22 10:39:24 (7 months ago)
Author:
circlingthesun@…

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2350, comment 3

    initial v1  
    11On further inspection, the workaround doesn't appear to be working. I might have mistaken the Cloudflare edge server IP for my own.
    22
    3 As far as I understand `set_real_ip_from your.balancer.ip;` means it trust whatever `real_ip_header` is set to be the real ip if it comes from my load balancer. So this won't do much because all traffic comes from the load balancer. Then `real_ip_header proxy_protocol` sets the `$remote_addr` to the one seen by the load balancer thats running the PROXY protocol. Then `proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for` appends $remote_addr X-Forwarded-For. So when I'm behind Cloudflare, this would be the edge server IP address, which is what I'm seeing.
     3As far as I understand `set_real_ip_from your.balancer.ip;` means it trust whatever `real_ip_header` is set to be the real ip if it comes from my load balancer. So this won't do much because all traffic comes from the load balancer. Then `real_ip_header proxy_protocol` sets the `$remote_addr` to the one seen by the load balancer thats running the PROXY protocol. Then `proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for` appends `$remote_addr` to the `X-Forwarded-For` header. So when I'm behind Cloudflare, this would be the edge server IP address, which is what I'm seeing.