Restrict route by IP
177 sites
Security covered
This module allows you to restrict access to specific routes on your Drupal site based on IP addresses or IP address ranges. You can define these restrictions using various formats, including IP ranges, wildcards, or CIDR notation, and apply them to routes identified by their name, path, or pattern.
The Restrict route by IP module provides an interface to manage route restriction by IP address.
Features
- Access restriction with a set of IP and/or IP range.
- IP range can be defined as follow:
- IP range with "-" (x.x.x.x-x.x.x.x)
- IP range with * (x.x.x.*)
- CIDR IP range (x.x.x.x/24)
- You can remove or just disable a route restriction
- You can see a preview of the impacted routes.
- Routes can be defined by:
- route name
- path
- path with wildcard (using % like /admin/%/content)
- regular expression
Installation
- Download or install with composer
- Enable restrict_route_by_ip
- go to /admin/config/system/restrict_route_by_ip to define all restrictions