Geo restrictions
Learn how geo restrictions work, where they are placed in the filtering hierarchy, and how to configure them.
|
What are geo restrictions?
Geo restrictions are a tool for blocking access to your web resource from specific countries. There are two options:
-
Block requests from selected countries.
-
Block requests from all countries except selected countries.
For example, the settings below block traffic from India and Pakistan from accessing the resource.
When to use them
Geo restrictions can be useful when:
-
Your service is intended only for users from specific countries.
-
You must comply with country-specific legal, contractual, or licensing restrictions.
-
You want to reduce unwanted traffic from regions that often send attacks or suspicious requests.
Where they are placed in the filtering hierarchy
The table below shows the full sequence of filtering mechanisms in Anti-bot and Anti-DDoS protection modes.
| Stage | Anti-bot | Anti-DDoS |
|---|---|---|
1 |
Black and white lists |
Black and white lists |
2 |
Verified bot list |
Verified bot list |
3 |
Geo restrictions |
Geo restrictions |
4 |
Custom rules |
Rate limits |
5 |
Individual protection profile |
During a DDoS attack: filtering based on request source class |
|
For a description of each mechanism, see Protection modes and filtering stages. |
The filtering stages run in sequence. As shown in the table, geo restrictions are stage 3. This means that the system first checks the request against the black and white lists (stage 1), then against the verified bot list (stage 2), and only then applies geo restrictions.
Example: suppose IP address 203.0.113.10 belongs to India. You add it to the white list but block India in geo restrictions. Requests from this IP address still reach the resource, because the white list, whose requests are automatically allowed, has a higher position in the filtering hierarchy than geo restrictions.
How to configure geo restrictions
-
Go to
Application protection → Resources. Click the ellipsis (…) next to the required resource and selectSettings.
-
Go to the
Geo restrictionstab.
-
Select an option:
-
No restrictions, the default setting: geo filtering is disabled.
-
Block selected countries: geo filtering is enabled and requests from the specified countries are blocked.
-
Allow selected countries only: geo filtering is enabled and requests from all countries except the specified countries are blocked.
-
-
For Block selected countries or Allow selected countries only, select the required countries from the drop-down list.
-
Click
Save.
Done. Geo filtering is enabled and blocks traffic from unwanted countries.