Module Description
Introduction Geoblock is a module that allows you to configure geographical access restrictions based on the geolocation results for each visitor's IP address.

An example use case that this module makes possible is to block all requests using an unsafe HTTP request method before they're processed by Drupal as a spam prevention technique.

Features
* This module supports two dimensions of visitor geolocation consisting of a "usage country" and a "registered country." The "usage country" is the location of the IP address at the time of use, and the "registered country" is the country in which the IP address was registered.
* This module provides two restrictions out of the box. The first restriction is a "domestic use" restriction which simply requires that the visitor's "usage country" and "registered country" are identical. The second restriction allows the site administrator to configure a list of countries which can either be exclusively allowed or blocked.
* Restrictions can be selectively applied to a subset of HTTP requests methods (e.g., POST and PUT but not GET). By default, all unsafe HTTP request methods are selected for enforcement.
* You can write your own data source module by implementing the GeoblockDataSourcePluginInterface and using the @GeoblockDataSource plugin annotation.
* You can write your own restriction module by creating a service implementing the RestrictionInterface and using the geoblock_restriction service tag.

Installation
* Download and enable the Geoblock core module using your preferred installation method (both Composer and manual installation are supported).
* Find a companion data source module, then download and enable it.
* Consult the documentation for the data source module to determine if any additional configuration or setup is required.

Configuration
* Configure the module's permissions by clicking "Permissions" after locating the module in Drupal's module installation interface, or by searching for the "Geoblock" section on Drupal's permissions overview page.
* Configure the module's settings by clicking "Configure" after locating the module in Drupal's module installation interface, or by directly visiting /admin/config/geoblock.

The following settings are available for configuration:


* Data source: The data source plugin may require further configuration; consult its documentation for further instructions. If no data source is selected, this module is effectively disabled.
* Applicable HTTP methods: Select the HTTP request methods for which all restrictions are applied. If no methods are selected, this module is effectively disabled.
* Enable logging: If enabled, log messages will be recorded when a restriction has been enforced.
* Require domestic use: If enabled, any IP address being used in a different country than its registered country will be blocked.
* Restriction type: The selected restriction type will determine how country restrictions are enforced. Available types are Do not enforce country restrictions, Allow only the selected countries, and Block the selected countries.
* Restriction countries: Select the countries for which to apply the configured restriction type.

Project Usage
60
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
Geoblock module aims to solve the problem of configuring geographical access restrictions based on visitor geolocation for spam prevention and security purposes.
Data Name
geoblock

OPENAI CHATBOT

OPENAI CHATBOT

14:31:40
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.