communiteq / discourse-geo-blocking

GNU General Public License v2.0
2 stars 0 forks source link

Plugin has no noticable effect #2

Closed kwinz closed 3 months ago

kwinz commented 3 months ago

I enabled the plugin and blocked certain country codes, but as far as I can tell it had no effect. Visitors from those countries can still access the Discourse. I tried different VPN endpoints in those countries both logged in and logged out, and I made sure to wait 1 minute in betwen. I also blocked my AS number but I can still access the Disourse.

I got a warning message about a missing DISCOURSE_MAXMIND_LICENSE_KEY when I do ./launcher rebuild app, but I think that was not related to this plugin because, after supplying that and rebuilding, it still doesn't work.

My settings: image

Where should I expect the log output? I checked /shared/log/rails/production.log and /var/log/nginx/access.log, but didn't see anything relevant at first glance.

Any idea how to debug this issue? Thanks in advance!

communiteq commented 3 months ago

The log output should appear in /logs on your forum.

kwinz commented 3 months ago

Thank you! I see, so the logs can be accessed over the web on /logs.

I just discovered an hour ago that we have an OPSense instance that I didn't know about, changing the source IP and interfering with this plugin. That explains why it had no noticable effect. This issue can be closed. Appreciate your reply and sorry for the noise!

communiteq commented 3 months ago

Thank you for getting back to this!

That is a misconfiguration. You should set up X-Forwarded-For headers in your OPSense instance so it will pass the source IP to Discourse. Apart from the effects on this plugin, such a misconfiguration can also cause issues with rate limiting and IP blacklisting.