The free MaxMind GeoLite2 Country database is used, so it depends on the integrity of its data. The database is downloaded to the
/store/phpbbservices/filterbycountryfolder. The extension optionally tracks the number of page requests by country that are allowed and restricted. It is all controlled from two modules in the Extensions tab in the ACP.
- You can allow users to login from restricted countries, if you enable the feature. Otherwise guest and bots see no forum content. Only the login link works.
- Allows you to allow or disallow access to an IP which does not have a match in the MaxMind database. Based on my testing, these IP addresses are used by Virtual private networks (VPNs).
- There is a VPN-only mode. In this mode, if the IP is found in the country code database, it is not allowed. If it is not found it is assumed to belong to a VPN.
- Can filter out bots in phpBB's database from statistics.
- Can log all restricted attempts in the admin log, if enabled. This can result in a very large log!
- A cron automatically updates the database weekly
To keep your board from locking up, if you don't choose any countries to allow or restrict, all traffic is allowed. So the first thing to do is set the extension's settings correctly.
A standard block message looks like this. Clicking on any link simply returns the same page.
If you want to allow registered users to login from blocked countries, the block message looks like this:
The extension can be downloaded here:
The GitHub for the project is here: