- IP check can be bypassed by role. Roles are selected on the site permissions page, after enabling this feature on the module settings page
- When roles are allowed to be bypassed, users can either be redirected to the login page, or be shown a link to the login page on the access denied page
- IP checking can be set for the entire site (check IP addresses on any and all paths), selected paths can be blacklisted (check IP addresses only on those paths), or selected paths can be whitelisted (check IP addresses on all paths other than those paths)
- Countries can be whitelisted (only users from those countries will be allowed access) or blacklisted (users from those countries will not be allowed access). Note that this functionality requires the following modules:
- Regions on the page can be whitelisted by implementing hook_restrict_ip_whitelisted_regions() (see restricted_ip.api.php)
- The output on the access denied page can be changed/added to/removed by implementing hook_restrict_ip_access_denied_page_alter() (see restricted_ip.api.php)
- Comments can be added to the configuration page, allowing users to leave notes on which IP address (or range) is for what. Comments of the following formats are allowed:
- The README.txt contains recipes on how to perform various actions, and customize the output when a user is restricted by IP address
- Denied access attempts can be logged to to the Drupal log. This requires the Database logging (dblog aka watchdog) module to be enabled, and the box to be checked on the settings page.
- Whitelisted URLs can be added to the settings.php file, by creating the following array:
$conf['ip_whitelist'] = ['127.0.0.1'];
$conf['restrict_ip_whitelist'] = array('127.0.0.1');
8.x-2.0-beta1 has been released, with the white/black listing by country feature enabled, however, no automated tests have yet been written. It seems to work fine, and could use some user testing. A release candidate and full version will be released after automated tests have been written.
- Install the module as you would any other module
- Navigate to Admin -> Configuration -> People -> IP Address Whitelist
- Enter enter allowed IP addresses. You can enter either a single address in IPv4 or IPv6 format, or a range of addresses in the form of
AAA.BBB.CCC.XXX - AAA.BBB.CCC.YYY. Each address or range of addresses should go on a separate line.
- Ensure the 'Enable module' checkbox is checked
- Submit the form to enable the module
If you enable IP restriction do not enter your own IP address, you will be locked out of the site immediately upon save. Your own IP address is given on the settings page so that you can enter it into the list. If you do accidentally lock yourself out of your site, see the README.txt file for instructions on how to get back access to the site.
- Maintenance status: Actively maintained
- Development status: Under active development
- Reported installs: 579 sites currently report using this module. View usage statistics.
- Downloads: 10,855
- Last modified: 11 April 2017
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.