"You can't login from that IP address"

One thing to be aware of is, if you’re using a CDN (or at least with cloudflare) it’s possible that their edge server IPs are seen by your discourse install… vs the visitor’s IP.

So if you perform a “ban user and IP address” you can run into issues as you have effectively banned that edge server from your discourse install, along with any users that happen to be routed to it.

That said, I believe there is a way to fix this, but I can’t recall the process.

But nonetheless, something to look out for if you or your users report that they are being blocked from your site.

1 Like

Thanks for the insight. I think our forum have this CloudFlare CDN issue. Many users complain about being blocked but their IP address are not in the blocked list.

1 Like

Hello Jeff, facing the same issue strangely from a day. There is only one admin account and we cannot login to any account including - user accounts. We have not enabled any IP range to block, except disabling one user to create account again.

Tried multiple devices with different IPs and still getting the “You can’t login from that IP address” error.

Anyone can help?

Does any of the advice above help in your case?

Thanks for your reply.

Tried logging in from different mobile devices and with different IPs and locations. Nothing helped.

I can only get into the Admin dashboard if I can login, which I’m unable to do so in any case.

It looks like I’m completely locked up and not able to login. Please suggest if there is a way to login.

This is a tricky one, as I’m not entirely sure how you’ve done it. :slight_smile:

But this is for all users, not just admin? (to rule out the use admin ip allowlist setting)

Do you have a CDN in front of your forum? If you disabled a user by deleting them, and then clicked the ‘Block IP’ button, that may account for the unintended blanket lock-out. If so, you could try disabling that.

If you have server access (and are comfortable) you could look at the IP blocklist using the rails console, and delete the one that’s jamming you up:

3 Likes

@JammyDodger Thanks for your reply.

The block is happening for all the users and yes CDN is enabled infront.

Thanks for all the suggestions.

Well, what I have done is used local hostfile method to point the IP and access the forum. Logged into the dashboard and removed Screened IP of that one user account which was blocked and that resolved the issue. Wondering how come discourse considered that single IP and kept on blocking every user from various IPs from the CDN.

Anyways, now the problem is resolved. Much thanks to you as well as the community.

2 Likes

I’m glad you got that sorted. :slight_smile: :+1:

I’m afraid CDNs aren’t my specialty, but I believe there’s a bit of discussion in these topics which may be pertinent -

2 Likes

It does send a one-time login link, but with 2FA enabled, I still can’t login:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.