backdrop-contrib / ip_blocking

Enables blocking of IP addresses.
GNU General Public License v2.0
0 stars 2 forks source link

IP Address Blocking

Allows you to block IP addresses. This module restores the lost functionality from the Drupal core. It also comes with a number of improvements.

Options available:

Installation

Install this module using the official Backdrop CMS instructions at https://backdropcms.org/guide/modules

Note: If you have the "Ban IP" module installed, you will need to uninstall it first.

Configuration and usage

The administration page is available from the Administration > Configuration > User accounts > IP address blocking menu (admin/config/people/ip-blocking) and can be used to:

While browsing "Recent log messages" (admin/reports/dblog) you can quickly review an individual entry (admin/reports/event/EVENT_NUMBER) and block (or unblock) an IP address and check the status of this IP on AbuseIPDB from the "Operation" links.

This link will be displayed for 'access denied', 'antiscan', 'ip_blocking', 'login_allowlist', 'search', 'page not found', 'system', 'user', 'php' and 'ajax' event types if the event has a valid IP address and not the IP address of the currently logged in user.

Screenshots are available at https://findlab.net/projects/ip-address-blocking

Known issues

Sometimes you may see in log messages like this:

"Warning: Cannot modify header information - headers already sent by (output started at /core/includes/bootstrap.inc:3132) in ip_blocking_boot() (line 113 of /modules/contrib/ip_blocking/ip_blocking.module)"

Here is the explanation.

When Backdrop served a cached page, the 'X-Backdrop-Cache: HIT' and 'cache-control' headers were sent with the obsolete entries before they were actually generated for the request.

To avoid such messages and incorrect module actions (in such cases can not get in time to reject blocked IP) you have two options:

Disabling prefetching for cached pages (first option) is sufficient to avoid such collisions in most cases.

Note for Drupal 7 migration

If you install this module on a site that has been upgraded from Drupal 7 and has blocked IPs (in the 'blocked_ips' table), this module will rename that table to 'blocked_ips_d7') and create its own 'blocked_ips' table with 4 additional columns: 'reason', 'uid, 'time' and 'type'.

After installation, you can re-import previously blocked IPs from the 'blocked_ips_d7' table, or delete this table if you do not need it by using the link on the "Status Report" page or by going to 'admin/config/people/ip-blocking/orphaned_table'.

License

This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.

Current Maintainer

Vladimir (https://github.com/findlabnet/)

More information

For bug reports, feature or support requests, please use the module issue queue at https://github.com/backdrop-contrib/ip_blocking/issues.