PageRenderIPRestriction by Teppo

This module adds basic capability to restrict page rendering to selected number of IP addresses.

Page Render IP Restriction Module

This module adds basic IP restriction capabilities to page rendering. Please note that this is only meant to be used as an additional security measure in addition to typical username/password authentication or something similar, not on it's own.

This is very important especially if protected content is valuable and/or sensitive. In those cases it would also be a much better idea to add all IP restriction rules within (software or hardware) firewall instead of relying on a module.

Installing


Copy PageRenderIPRestriction folder to your /site/modules/, go to Admin > Modules, hit "Check for new modules" and install Page Render IP Restriction. That's it.

How to use


Default settings for this module don't introduce any restrictions. You should edit module settings (Admin > Modules > Page Render IP Restriction) to include those IPs you wish to allow access to your site for. Please note that if you fill in at least one IP address and check both "Restrict admin access" and "Restrict access for authenticated users" checkboxes you will no longer be able to reach Admin without valid IP.

Settings


Allowed IPs

  • IP addresses that have access to your site
  • Each address on it's own line
  • Supported formats: 127.0.0.1 (individual IPs), 127.0.0.1-127.0.0.255 (IP ranges) and 127.0.0.0/24 (CIDR)
  • Default: null

Access denied message

  • What message should users get when they're being denied access?
  • Leave blank to show no message. HTML markup is supported.
  • Default: null

Access denied action

  • What should happen when user is denied access?
  • Possible values: "Exit with specified message" or "Redirect user to login page", but latter option has no effect if admin access is also restricted
  • Default: null (send HTTP/1.1 403 Forbidden header + no message)

Restrict admin access

  • If you check this box, admin pages will only be available for users with valid IPs
  • Default: false

Restrict access for authenticated users

  • If you check this box, IP restriction will also apply to authenticated (logged in) users.
  • Default: false

Exceptions to access restriction (allowed paths)

  • With this setting you can define paths that are excluded from access restriction
  • You can optionally specify the request method: /my-allowed-url/ POST
  • Default: null

Exceptions to access restriction (allowed domains)

  • With this setting you can define domains that are excluded from access restriction
  • Default: null

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Twitter updates

  • ProcessWire 3.0.185 (dev) core updates, plus new Session Allow module— More
    17 September 2021
  • Three new ProcessWire Textformatter modules: Find/Replace, Markdown in Markup, and Emoji— More
    3 September 2021
  • This week we have a new master version released after a year in the making. With nearly 40 pull requests, hundreds of new additions and more than 100 issue reports resolved, this new version has a ton of great new stuff— More
    27 August 2021

Latest news

  • ProcessWire Weekly #388
    In the 388th issue of ProcessWire Weekly we'll check out the latest core update, introduce two new third party modules, and more. Read on!
    Weekly.pw / 16 October 2021
  • ProcessWire 3.0.184 new master/main version
    This week we have a new master/main version released after a full year in the making. As you might imagine, this new version has a ton of great new stuff and we’ll try to cover much of it here.
    Blog / 27 August 2021
  • Subscribe to weekly ProcessWire news

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer