Drupal Core Module - Ban IP addresses

Drupal Ban Module

The Drupal Core "Ban" module is very useful to keep away spammers and bad guys try to access your Drupal based website.  The module has been there since Drupal 7 and is available in 8,9 and 10.

You simply need to enable the module from 

Home > Administration > Extend (modules) 

 Once enabled simply go to   

Home > Administration > Configuration > People  > IP address bans

And simply add the IP address you would want to ban for accessing your Drupal site.

To remove an IP from the ban list, delete that from the listed addresses.

Drupal Ban module interface

Note: Drupal will prevent you from banning your own IP address. So do not worry of accidentally banning your self.


You can see the official documentation here https://www.drupal.org/docs/8/core/modules/ban


Main category

Add new comment

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
10 + 10 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

"Natraj"  Bungalow,
Colony No.7,  Sr.No. 38.
(Lane Behind Sai Baba Mandir)
Kale Borate Nagar, Hadapsar,
Pune - 411028.
Get Directions