Unable to log into my discourse - "You can't log in as xxx from that IP address."

Uh oh - I am having a problem!

Update: my suspicion is that this is about cloudflare, and the way we block IP addresses when deleting users. Is there any way to fix this so we can log into our discourse again??

You’ll need to go into the rails console or postgresql command line and delete the ScreenedIpAddress record for your IP address.

s = ScreenedIpAddress.match_for_ip_address("...")
s.destroy
1 Like

Thanks, @neil! I’m happy to do this but don’t know how to do it. Would you be willing to give me steps? I’d really appreciate it.

Using the standard Docker install:

cd /var/discourse
sudo -E ./launcher enter app
rails c
s = ScreenedIpAddress.match_for_ip_address("...")
s.destroy

You might have used a different name than “app” for your yml file.

5 Likes

Use ScreenedIpAddress.all to see what’s there and which ones you need to delete.

1 Like

thanks everyone! so what worked for me ultimately was:

  1. log in using my phone (where I had not yet logged out!) and grab the user list, which includes IP address for users
  2. opened rails console using commands provided elsewhere by @sam, then ran commands provided by @neil for the IP address of affected users
6 Likes

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