Note on X-Forwarded-For
Perimeter security is essential for this setup. When users connect from a public IP address, the request initially reaches the perimeter firewall before proceeding to the ADSelfService Plus server. This means the server sees the firewall’s IP address, not the user’s original IP. If the firewall’s IP falls within the internal range, MFA won’t be enforced. To address this, ensure that X-Forwarded-For is enabled at each network hop. This ensures the source IP is included in the request, allowing accurate IP-based Conditional Access.
Create a policy named "Internal Policy", targeting relevant users and configuring MFA for required endpoints; refer to these policy configuration steps for detailed instructions.
Duplicate the Internal Policy by clicking the Copy option under the Actions column and renaming it to "External Policy".
Edit the Internal Policy and disable MFA for endpoints.
Navigate to Configuration > Multi-Factor Authentication, and select the policy named Internal Policy. Select the MFA for Endpoints tab, then in the MFA for Machine Login section, disable the Enable N factor authentication for Machine login checkbox.
Step 2: Configuring conditional access
Fig.1: Configuring Conditional Access rules for internal IP range
Fig.2: Assigning Conditional Access rules for the internal policy
3. Copy the Internal Access rule and rename it as External Access. Modify this rule’s criteria to "NOT 1," meaning all IP addresses outside the defined internal range.
4. Navigate to the Rule Assignment tab, then select External for the Choose CA rule drop-down. In the Access Controls section, enable the Assign Policies checkbox and assign the External Policy.