04 Mar 2025
-
The Ban Module allows you to ban visitors or requests to their site from individual IP addresses.
You can ban an IP Accesing to /admin/config/people/ban

To ban an IP just fill the field and press Add.
If you want to delete this banned IP just click on delete operation.

Additionally you can perform this whole process using Drush.
drush sql:query "SELECT * from ban_ip;"
drush sql:query "DELETE FROM ban_ip WHERE ip='119.80.1.6';"
drush sql:query "TRUNCATE ban_ip;"
Banning of IP addresses.
Module documentation (drupal.org)