GEO IP Blocking¶
If your content is not intended for all countries or cities, or you want to block a particular IP address of a user, you can customize access settings in the "GEO IP Blocking" section. To access it, click on your name at the top right and select "GEO IP":
For Geo IP restrictions to work correctly, you need to create at least one plugin instance with a database for Geo IP in the “Plugins” section
This is where the blocking rules are created. To add a new rule, click
The rule creation window will open:
- Title - the name of the rule or group of rules. For example, “Block Countries” or “Block Users”.
- Use for authorization - if the checkbox is checked, the rule will be applied at the user authorization stage. In case of its absence, the rule will be applied after authorization.
- OS - the operating system on whose application the rule or the whole group of rules will be applied.
- Mode - two locking modes are available: Allow to everybody except... Block everybody except...
The “Add Rule” button opens the following configuration fields:
Restrictions can be customized for countries, cities, or individual IPs. To do this, select the blocking type and enter its purpose.
With the IP blocking type, the IP mask is specified as a regular expression.
You can find the desired regular expression using a search query, for example, “regular expression for ip address”.
You can test the found regular expression here: https://regexr.com/.
You can create several rules within one group:
To delete a line with a rule, click on the cross on its right side.
To edit an existing rule, click on it.