Summary: Geo Blocking plugin for Discourse
GitHub: GitHub - communiteq/discourse-geo-blocking
Install: Follow the plugin installation guide.
Client: This plugin has been sponsored by Sketchfab.
Features
This can be used to completely block access to your forum for certain countries or networks, for example fraud prevention or to comply with sanctions.
The plugin leverages the MaxMindDB database that is already available in Discourse.
Configuration
- Enable the plugin
- Add all networks you want to block to
geo_blocking_asn_blocklist
. Prefix the numbers with AS, so for exampleAS12345
. - Add all countries and regions you want to block to
geo_blocking_country_region_blocklist
. The following formats are accepted:- Full country name (for example:
Belgium
) - Country ISO code (for example:
JP
for Japan) - Full country name followed by a dot and then the region name (for example:
Switzerland.Jura
).
- Full country name (for example:
- If you enable
geo blocking detailed reason
then the error message will contain the country/region or network that caused the user to be blocked.
versus
- To test the plugin you can check
geo blocking log blocked
and/orgeo blocking log allowed
and inspect the/logs
on your forum.
For a full list of supported countries and regions, see list_of_countries_and_regions.txt.
Attention and Caveats
If anonymous visitors are being blocked, they could still get a cached version of the home page for around one minute.
The error page does not contain “Popular” and “Recent” topics because that would leak content to a blocked user.