<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
How to Create IP Exceptions with Dynamic Network Zones Based on User Location
Administration
Okta Classic Engine
Okta Identity Engine
Overview

This article explains how to restrict or allow access to an Okta tenant based on location while also allowing a way to grant access to users who are traveling to other countries or need to gain access outside of the specified location.

Applies To
  • Network Zones
  • Sign-On Policies
Solution
  1. Create a group by going to Directory > Groups > Add group. In this example, we will name it "Users on travel".
    Add groups 
  1. To define a Dynamic Network Zone, from the Admin Dashboard, go to Security > Networks > Add Zone > Dynamic Zone > Name it "US Zone" or any other desired name > Locations = United States > Save.
US Dynamic Zone
  1. For orgs running on Okta Identity Engine (OIE), navigate to Security > Global Session Policy > Add policy.
  2. For orgs running on Okta Classic, navigate to Security > Authentication > Sign On > Add New Okta Sign-on Policy.
  3. Name the policy as desired (this example will use "Allow US traffic").
  4. Navigate further to Assign to Groups and select the Everyone group.
  5. Next, click on Create policy and add rule.
    New Okta Sign-on Policy 
  1. A second screen will pop up. Name the rule as desired (this example will use "Allow US rule") and configure the rule's policy settings as follows:
    •  IF User's IP is = Not in zone and select US Zone as per the screenshot below.
    • THEN Access is = Denied
      Edit rule 
  2. Click Create Rule. 
  3. Move this policy to the top of the priority list.
 
With this policy, Okta will only allow traffic coming from the US. To accept traffic from users who might be in another country while traveling, leverage the group created earlier, "Users on travel."
  1. Click again on Add New Okta Sign-on Policy > Name the policy "Allow users on travel" > Assign to Groups > Select Users on travel > Create policy and add rule > Name the rule "Allow travel rule" > THEN Access is = Allowed > Create rule.
Add policy Add Rule 
NOTE: This policy should take precedence over the "Allow US traffic" policy in the priority list. The "Allow users on travel" policy should be at the top, followed by "Allow US traffic".
The order of the policies  
By leveraging the "Users on travel" group and assigning people to it, they will be allowed access to Okta even when outside the United States. Anyone not in the US and/or the "Users on travel" group will not be able to sign in.


Related References

 

Loading
How to Create IP Exceptions with Dynamic Network Zones Based on User Location