Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

ban

917 sites Security covered
View on drupal.org

Ban was a core module from Drupal 8 to 11 and has moved to contrib for Drupal 12.

#1570102: [Policy] Deprecate Ban module

Ban allows administrators to ban visitors or requests to their site from individual IP addresses.
The Ban module is made to be extremely fast and lightweight, so that in cases of DDoS the Ban middleware intercepts fast and with little memory footprint.

Post-Installation

To ban an IP address

  1. Navigate to /admin/config/people/ban.
  2. Enter an IP address (for example, 10.0.0.1).
  3. Click Add.

Drupal will prevent you from banning your own IP address.

To remove the ban from an IP address in the UI

  1. Navigate to the ban page (see above).
  2. Beside an IP address, click Delete.

Ban Drush Commands

Available commands for the "ban" namespace:
  ban:ban        [ban-ban] Ban an IP address.
  ban:flush      [ban:unban-all|ban-flush|ban-unban-all] Unban all IP addresses.
  ban:list       [ban-list] List all banned IP addresses.
  ban:unban      [ban-unban] Unban a specific IP address.
  ban:unban-all  Unban all IP addresses.
  • Perimeter module uses ban to block IPs that accessed configured URLs
  • Crowdsec module uses ban to ban IPs by attack signals
  • Autoban module allows automatizing IP ban using watchdog table by the module rules.
  • For more advanced features and sophisticated levels of IP based protection, it is also worth considering system installed alternatives such as fail2ban

Alternative modules

Activity

Total releases
5
First release
Jul 2025
Latest release
2 weeks ago
Release cadence
63 days
Stability
20% stable

Release Timeline

Releases

Version Type Release date
1.1.0-beta2 Pre-release Apr 2, 2026
1.1.0-beta1 Pre-release Mar 19, 2026
1.1.x-dev Dev Feb 24, 2026
1.0.0 Stable Jul 30, 2025
1.0.x-dev Dev Jul 25, 2025