How To Block IP Address in Drupal 8

| Drupal Development | 62 seen

Unlike in Drupal 7 version where IP banning is enabled by default, with Drupal 8 version, there is one more step added - IP banning must be enabled from the extend section.

Here is how. (source)

  1. Log into your Drupal 8 admin interface.
  2. From the top menu bar, click on the menu tab and then the Extend tab from the second menu bar.
  3. You are now on the modules list page. The Ban module is listed under the Core category. To enable it, simply click on the checkbox to the left of the module.
  4. Once selected, scroll to the bottom and click on the Save Configuration button to enable the module. Now that you have the Ban module enabled, you can now block IP addresses.

Now head to the Configuration -> People -> IP address bans and manually enter IP addresses that are abusing your Drupal 8 website

Ip address bans in Drupal 8

Ip address bans in Drupal 8