# IP Whitelist

## **Overview**

The **IP Whitelist** is a security feature that ensures only authorized backend IP addresses are allowed to access the casino API. To ensure secure communication, agents must register their backend IP addresses into the IP Whitelist on the API Settings page. This process allows the **Web Application Firewall (WAF)** rule to validate and approve access to the API server from those specific IP addresses.

[`https://my.nexusggr.com/app/settings`](https://my.nexusggr.com/app/settings)

## **How it Works:**

1. **Agent IP Registration**:\
   Agents need to register their backend IP (either **IPv4** or **IPv6**) in the IP Whitelist on the API Settings page of the API panel to enable access to the casino API.
2. **WAF Validation**:\
   The **Web Application Firewall (WAF)** will verify the registered IP address. Once validated, the agent's backend can successfully communicate with the API server.
3. **Duplicate IP Handling**:\
   If an agent tries to register an IP address that is already whitelisted, an error message will appear indicating the IP is duplicated. In this case, no further registration is necessary.
4. **IPv4/IPv6 Requirement**:\
   It is mandatory that the agent's backend IP is either **IPv4** or **IPv6**. \
   Agents can obtain their server’s IP by running one the following commands in the CLI of their server system:<br>

   ```bash
   curl ifconfig.me
   curl ipinfo.io/ip
   curl api.ipify.org
   curl icanhazip.com
   ```

   \
   This command will return the server’s **IPv4** or **IPv6** address, which should then be registered on the whitelist.
