How to add ip to screened ips list via ssh

(Bhaskar Chakraborty) #1

Hi I accidentally check “use admin IP whitelist” now somehow my admin ip address is blocked so I cant access admin panel. I have SSH access, is there is any way to add ip to screened ip list via ssh or uncheck “use admin ip whitelist” via ssh. Thanks in advance.

(Felix Freiberger) #2

These (untested) steps should work:

cd /var/discourse
sudo ./launcher enter app
rails c
irb > SiteSetting.use_admin_ip_whitelist = false
irb > exit

(Bhaskar Chakraborty) #3

Wow Felix, Thanks for the help. Given code works like charm. Saves my day.

(Joshua Rosenfeld) closed #4

This topic was automatically closed after 29 hours. New replies are no longer allowed.