# 4.8 Geo Fencing Configuration

## 1. Overview

ZTrust provides Geo-Fencing through an interactive maps configuration. This allows administrators to define virtual boundaries (geofences) on a map and apply them to specific groups

With ZTrust’s Geo-Fencing:

1. **Define Boundaries** – Create geofences for user groups using interactive maps.
2. **Control Access** – Enforce location-based login restrictions in real time.
3. **Enhance Security** – Prevent logins from unknown or unapproved regions.
4. **Flexible Configuration** – Manage geofence rules directly from the admin console.

## 2. Prerequisites

Before enabling and configuring Geo-Fencing (Maps Configuration) in ZTrust, ensure the following are in place:

**SMTP Email Configuration** – An active SMTP email setup must be present to send system alerts, notifications, or verification messages related to geofence-based access. *\[*[*Click here*](https://ztrust.gitbook.io/ztrust-documentation/user-manual-ztrust-v4.2/4.-admin-manual/4.7-smtp-email-configuration)*]*.

**Group Structure** – User groups should already be created so that geofence rules can be assigned to them.

{% hint style="warning" %}
**Note**:  Geo-Fencing works together with both username/password and Multi-Factor Authentication (MFA).
{% endhint %}

## 3. Configuration

1. Login to the **ZTrust Admin Console**.

   <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2F8VknKo1ZGdqkmc42er6j%2Fimage.png?alt=media&#x26;token=b45c60bb-14bf-498a-a2bc-7f2a2ab22ef0" alt=""><figcaption><p>Fig 4.7.a: Master realm welcome tab</p></figcaption></figure>
2. Click on **Manage Realms** in the sidebar to view the list of realms available in your **ZTrust**.

   <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2Fj35nRLkV0Pp1Q8A4Tot0%2Fimage.png?alt=media&#x26;token=e6685d91-1aec-4d54-b256-64c72548ba28" alt=""><figcaption><p>Fig 4.7.b: List of realm under manage realms</p></figcaption></figure>
3. From the list of realms, select the **realm** where you want to configure **Geo fencing**.

   <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2F1cZTOM1NkbAcgRmfgzqv%2Fimage.png?alt=media&#x26;token=a5034b5a-5d4d-4699-bf50-c47201aae1be" alt=""><figcaption><p>Fig 4.7.c: Welcome page of demo realm</p></figcaption></figure>
4. In the left sidebar, under the **Manage section**, choose **Groups** menu

   **Note:** In ZTrust, Geo-Fencing can be applied at the **group level**. If you have multiple users across different locations, create **groups**, assign users to them, and configure the geofencing rules accordingly.

   <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FTAJLccIp2lTIgdaaBW21%2Fimage.png?alt=media&#x26;token=153a749d-e01d-4953-9d27-70b1b1c368e0" alt=""><figcaption><p>Fig 4.7.d: Groups section in Side bar </p></figcaption></figure>
5. Click on the **Create Group** button. A popup will appear where you can enter the details to create a new group.

   <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FSD4Ao75lv27IhTgpPBH1%2Fimage.png?alt=media&#x26;token=382e40ba-81db-4024-bf0a-17f6b69bfcb4" alt=""><figcaption><p>Fig 4.7.e: Create a new group</p></figcaption></figure>
6. Enter a name for your group in the popup. For example, you can name it **Demo**.

   <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2Fn60n6MAfKfLbEUOHgebV%2Fimage.png?alt=media&#x26;token=779b8395-de25-4f99-9315-d55179f5ac5f" alt=""><figcaption><p>Fig 4.7.f: Successfully created group</p></figcaption></figure>
7. From the group list, select the group you just created.

   <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2F7kM4AxcQxcpsJdRZLKWi%2Fimage.png?alt=media&#x26;token=e2e612ff-8800-4708-8fbc-6c50f1ed21f7" alt=""><figcaption><p>Fig 4.7.g: Choose group</p></figcaption></figure>
8. On the group page, you will see tabs such as *Child Groups*, *Members*, and *Attributes etc*. At the end of the row, select the **Geo fencing** tab. This will open the interactive map where you can configure geofencing.<br>

   <figure><img src="https://chat.google.com/u/0/api/get_attachment_url?url_type=FIFE_URL&#x26;content_type=image%2Fpng&#x26;attachment_token=AOo0EEU4NzsWYue6pTy3NtYY1vh32XYu%2BcPzPe0WmFouHEqCIeC0K4Yq3AW0J5g%2FmykxWm83RdwHxzkyrsggbfGApboc9DzndZfHbU6O5BkdZm2N7J%2Btk1JacBS9OOsTb0zBKS2zR39VQgHxeFn1ZXsQVLU5U3TzuIAIerWyZ15ILUOh7lZDi51tvdaastYcMPS6ZxQX4r0u0VlVnIBEpsT7mF4fnFu%2Frr2bz0u9aIf%2Fl6QhWESanPGwqLx2w74%2FKEIL3tiFY8xO%2B2W0e%2Fmp74yAM4ef%2BFsV%2BClOAlm88mr7iTY4gWdUfh9AUv2f4Dsx3lq6e11TAL82csEhIa4J3Aqtm4Yhemrximd%2FCSmExIKQL%2FxpPfdHYTwToQAIuR%2BSRZnbdhIGu5%2FQEoXsDeMOrSvvATVyuG4%3D&#x26;allow_caching=true&#x26;sz=w512" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2Fdhm4HefVN6tmZTjE6tWi%2Fimage.png?alt=media&#x26;token=5abc628e-ccf5-4556-841e-e0cb9f63c921" alt="" width="563"><figcaption><p>Fig 4.7.h: Geo fencing tab under group</p></figcaption></figure>
9. Once the map loads, navigate to the desired location where you want to configure Geo-Fencing. Use the **Zoom In** and **Zoom Out** controls to adjust the view as needed.

   <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FchAIHfTmnj8iE9vhpFPW%2Fimage.png?alt=media&#x26;token=8949224f-6d1d-4347-b275-3d012a64fc84" alt=""><figcaption><p>Fig 4.7.i: Choose area to fence</p></figcaption></figure>
10. After selecting the location, zoom into the center of the area where you want to configure Geo-Fencing. Click on that spot, and a popup will appear asking you to confirm the selection.

    <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FdShrs9PCoLBcjr0zXgPq%2Fimage.png?alt=media&#x26;token=d70e6ed3-f267-4743-b51b-6ca6bc15e555" alt=""><figcaption><p>Fig 4.7.j: Confirm area by clicking on the chosen area</p></figcaption></figure>

    **Note:** In the **Radius** field, you can set the distance (in meters) according to the coverage area you need.
11. After confirming the location, click on the **Set Geo-Fencing** button. The system will display a processing page while your configuration is being saved.

    <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FAcdzjD4lfwVopUIGBUYt%2Fimage.png?alt=media&#x26;token=cfaf9fc0-8904-4b27-ab65-fafa8de61711" alt=""><figcaption><p>Fig 4.7.k: Saving the geo-fencing configuration</p></figcaption></figure>
12. After the configuration is successfully saved, you will be redirected to the *Child Groups* tab. Navigate back to the **Geo-Fencing** tab, where you will see a blue location pin. This pin indicates the location you have configured for the group.

    <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FEZPOYyXax67pPoYUrW5Q%2Fimage.png?alt=media&#x26;token=38bc636b-babb-42b0-89ef-e867dbf3c526" alt=""><figcaption><p>Fig 4.7.l: Saved geo-fencing </p></figcaption></figure>
13. To view the fenced location, click on the **blue location pin**. The map will automatically take you to the exact spot where the geofence was configured.

    <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FkHeC8Y3KtZHnT6xaC9vr%2Fimage.png?alt=media&#x26;token=8ebb5489-5a2d-43e5-b5e4-7086ac539917" alt=""><figcaption><p>Fig 4.7.m: Fenced area</p></figcaption></figure>
14. At this point, you have successfully configured Geo-Fencing in ZTrust.
15. Users must be part of the group that has Geo-Fencing configured. To include them, add users under the **Members** tab of that group. Only users within this fenced area will be allowed to log in from the defined location. Any login attempts from outside the fenced area will be denied.
16. To remove the geofence from a group, navigate to the **Attributes** tab of that group. From there, you can delete the geofencing attributes to clear the configuration.

    <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FlbyldlbWcLivSon08ORE%2Fimage.png?alt=media&#x26;token=6b0e3a82-60d8-469a-874c-29d4921452df" alt=""><figcaption><p>Fig 4.7.o: Group attributes of geo fencing</p></figcaption></figure>
17. In the **Attributes** tab, you will see four geofencing-related attributes. Remove these attributes and click **Save** to delete the geofence configuration for the group.

    <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FbTrQx1NBXNVeZ6hJf01r%2Fimage.png?alt=media&#x26;token=71a95bec-a7ea-4b6d-ac88-c0e99de59500" alt=""><figcaption><p>Fig 4.7.p: Deleted group attributes </p></figcaption></figure>

## 4. Conclusion

Geo-Fencing in ZTrust allows administrators to enforce location-based login restrictions at the group level. By assigning users to fenced groups, organizations can ensure that access is granted only from approved regions, while blocking attempts from outside. This provides an additional layer of security, improves compliance, and gives administrators flexible control over user access.
