True user IPs when using Cloudflare

AI-generated summary

A user encountered an issue with a user being blocked from registering due to an IP address restriction. After investigation, BryanV discovered the blocked user’s registration IP was from Cloudflare, despite the default setting suggesting repeat registration IPs should be uncommon. Stephen explained that this is due to Cloudflare acting as a proxy, hiding the true originating IP. To resolve this, Stephen recommended adding the Cloudflare template to the app.yml to reveal the true IPs. BryanV found this solution helpful.

I had a legitimate user message me directly saying that they could not sign up up because “New registrations are not allowed from your IP address”

After some investigation I found the relevant setting and bumped it up to 9999. But then I wanted to investigate further, so looked up the users reg IP after they signed up:

The other threads about this setting seem to indicate that repeat reg IPs should not be common, that the low default of 3 is reasonable. So does this situation with multiple reg ids coming from Cloudflare point to some misconfiguration I need to look in to? This instance is running on Digital Ocean, and there is just an A record on CloudFlare pointing at it.

As an aside I would strongly suggest admins be notified when users are turned away for this reason. I would never have known about or been able to help them sign up except that they emailied me directly.

Cloudflare acts as a proxy between your users and your server, which means the default configuration will show Cloudflare nodes rather than origin IPs.

You need to add the Cloudflare template to your app.yml so that you can see the true originating IP of your users.

Under templates: add:

- "templates/cloudflare.template.yml"

Then rebuild.

Brilliant, thank you!