"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 个赞

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 个赞

你好 Jeff,奇怪的是,我遇到同样的问题已经一天了。只有一个管理员帐户,我们无法登录任何帐户,包括用户帐户。我们没有启用任何 IP 地址范围阻止,除了禁用一个用户再次创建帐户。

尝试了多个具有不同 IP 地址的设备,仍然收到“您无法从该 IP 地址登录”的错误。

有人能帮忙吗?

以上建议是否有帮助?

感谢您的回复。
我尝试从不同的移动设备以及使用不同的 IP 地址和位置登录。但都没有帮助。
我只能在能够登录的情况下进入管理员仪表板,而我目前无法登录。
看起来我完全被锁定了,无法登录。请建议是否有办法登录。

这有点棘手,因为我不太确定你是怎么做到的。:slight_smile:

但这适用于所有用户,而不仅仅是管理员?(以排除 use admin ip allowlist 设置)

你的论坛前面有 CDN 吗?如果你通过删除用户来禁用他们,然后点击“阻止 IP”按钮,这可能会导致意外的全面锁定。如果是这样,你可以尝试禁用它。

如果你有服务器访问权限(并且熟悉操作),你可以使用 rails 控制台查看 IP 阻止列表,并删除那个卡住你的条目:

3 个赞

@JammyDodger 感谢您的回复。

该阻止影响了所有用户,是的,CDN 已经启用。

感谢所有的建议。

我所做的就是使用本地 hosts 文件方法指向 IP 并访问论坛。登录到仪表板并删除了被阻止的那个用户帐户的已屏蔽 IP,这就解决了问题。我想知道 Discourse 是如何考虑单个 IP 并持续阻止来自 CDN 的各种 IP 的所有用户的。

无论如何,现在问题已经解决了。非常感谢您和社区。

2 个赞

很高兴您解决了这个问题。 :slight_smile: :+1:

恐怕 CDN 不是我的专长,但我认为这些主题有一些讨论可能与您相关 -

2 个赞

它确实会发送一次性登录链接,但启用 2FA 后,我仍然无法登录:

1 个赞

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