Regions on the page can be whitelisted by implementing hook_restrict_ip_whitelisted_regions() (see restricted_ip.api.php).
IP-based Determination of a Visitor's Country.
Note that this functionality requires the following modules:
Countries can be whitelisted (only users from those countries will be allowed access) or blacklisted (users from those countries will not be allowed access).
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).
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.
Roles are selected on the site permissions page, after enabling this feature on the module settings page The module also has various configuration options to whitelist or blacklist pages, bypass IP checking by role, and alter the output when the user is blocked. This will happen for any and all pages these users try to access. No blocks will be rendered, and no JavaScript will be added to the page. Anyone trying to access the site from an IP address not in the list of allowed IP addresses will be redirected to an access denied page with the message "Your address is not in the list of allowed IP addresses". This module allows administrators to restrict access to the site to an administrator defined set of IP addresses.