I have been trying to get real ips to show up in Discourse without much success. I have add the cloudflare yml to my setup and have validated the discourse.conf in the container has the correct lines:
I have also validated that $http_cf_connecting_ip has the correct IP in the logs but for some reason $remote_addr is not being set properly. Has anyone else hit this?
Thanks for the response! I am using the cloudflare template. After further digging it appears that it is not working because all remote_addr coming into nginx are Docker addresses. I am trying to diagnose why this is.
Are you also using a local reverse proxy server? If so, you’ll need to add that address to your set_real_ip config (and maybe the reverse proxy will handle the cloudflare stuff?)
Thank you both for the help! It ended up that Immunify360 on our VPS was injecting itself as a proxy prior to the container. Adding the Docker IP to the set_real_ip_from temporarily fixed the issue while I look into disabling Immunify.