The IP Restriction add-on has two key features:
- You can whitelist IP addresses. Any IP addresses on the whitelist will be able to bypass content restrictions and gain full access to restricted content, even if they don't meet the requirements.
- You can also blacklist IP addresses. Any IP addresses on the blacklist will not be able to sign up through your Restrict Content Pro registration form.
Installing The IP Restriction Add-On
Download and install the plugin from your account dashboard here. If you need help installing the plugin, refer to the WordPress plugin installation documentation.
To license the plugin, please view our "How Do I License iThemes Products on My Sites" article.
Configuring the IP Restriction settings
The IP Restriction settings can be found in Restrict > IP Restriction.
The IP Whitelist option in the settings panel is a global setting. Any IP addresses entered here will be able to access all material on the site that is restricted through Restrict Content Pro, even if they don't meet the requirements.
Any IP addresses entered in this box will not be able to complete the Restrict Content Pro registration form. They will receive an error message whenever they attempt to submit it (see below).
Blacklist Error Message
This is the error message that will be shown to users who attempt to register for a subscription but are on the IP blacklist.
Configuring the whitelist for a membership level
IP addresses can also be whitelisted for a membership level. When you navigate to Restrict > Membership Levels you will find a new box for "IP Whitelist" when adding a new level or editing an existing one.
If you add an IP address to the whitelist here, members with that IP will gain access to any content that is restricted specifically to this subscription level. Here's an example:
Say you have one level called "Bronze" and another level called "Gold". You add the IP 220.127.116.11 to the whitelist on the Bronze membership level, then create a new page (Page #1) and restrict that page to members of the Bronze membership level only. If a user who is not logged in but has the IP address 18.104.22.168 visits your site, they will be able to access Page #1.
But let's say you create Page #2 and restrict it to members of the Gold membership level only. That same user will not be able to access this post, because they're only on the whitelist for the Bronze level and Bronze does not have access to this restricted post.
Configuring the whitelist for an individual post or page
When editing a post or page, you'll see a new metabox in the sidebar called "IP Restriction".
This allows you to configure the IP whitelist for this individual post or page only. You can enter an IP address (or multiple - one per line) in this box to grant users with that IP access to the content, even if they don't meet the criteria in the Restrict this content metabox.
Supported IP formats
For all IP whitelists and blacklists, one IP address should be entered per line. Both IPv4 and IPv6 are supported.
IP Restriction supports the following IP address formats in all IP inputs:
Single IP Addresses
All octets are not required.
Enter an IP address for the start of the range, followed by a hyphen, followed by the end of the IP address range. Ranges are inclusive, which means the start and end of the range will be whitelisted.
Wildcards can be combined with ranges.
When combining wildcards and ranges, all the wildcards in the first IP will be replaced with
0 and all the wildcards in the second IP will be replaced with
255. The IP will then be matched against that range.
For example, if you enter this range:
149.58.*-149.60.* it will be turned into: