Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Restrict route by IP

184 sites Security covered Drupal 10–11
View on drupal.org

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

  1. Download or install with composer
  2. Enable restrict_route_by_ip
  3. go to /admin/config/system/restrict_route_by_ip to define all restrictions

AI Use

AI may be used or referenced during the development process for the creation of bug fixes and for code generation. Development is done primarily with human skill, and AI is mostly used for boilerplate or consultation.

Maintainers

Actively maintained by solideogloria.

Branches

2.0.x

Please use this branch if possible. It fixes ambiguity that 1.0.x contains when it comes to URL parameters. See #3405569: Allow if no params in URL or none in configuration. Add test coverage as well..

1.0.x

While this branch supports Drupal 11, it will not be updated to support Drupal 12. Future support will focus on 2.0.x and later branches.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
Apr 2025
Latest release
17 hours ago
Releases (12 mo)
4 ▲ from 3
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
2.0.0-rc1 Pre-release 10–11 Aug 31, 2026
2.0.0-beta3 Pre-release 10–11 Aug 17, 2026
1.0.x-dev Dev 10–11 Aug 17, 2026
2.0.x-dev Dev 10–11 Aug 17, 2026
2.0.0-beta2 Pre-release 8–10 May 7, 2025
1.3.0 Stable 10–11 May 7, 2025
1.2.0 Stable 10–11 Apr 24, 2025