Remote users IPV6 address shows as localhost

I’m also experiencing this issue, after migrating my Discourse to a new server and deciding to NOT use Cloudflare.

I reinstalled Discourse from scratch then restored my backup.
I never re-added the Cloudflare template option from app.yml.

I tried adding the code from the other thread also:

- replace:
filename: /etc/nginx/conf.d/discourse.conf
from: "types {"
to: |
  set_real_ip_from 10.0.0.0/24;
  set_real_ip_from 172.17.0.0/24;
  real_ip_header X-Forwarded-For;
  real_ip_recursive on;
  types {

to app.yml but the issue still stands:

All IPv6 users show their last IP as 172.17.0.1.

IPv4 users addresses are shown perfectly.

There’s no reverse proxy or anything in use on this server - just the standard Discourse install as set out in the docs, serving traffic to 80/443.

3 Likes