Docs/Account/Guides/IP Access Control

IP Access Control

Restrict login access to specific IP addresses or CIDR ranges. Useful for corporate environments where users should only log in from office networks or VPNs.

How It Works

IP access control operates in one of two modes, configured per-tenant:

Allowlist Mode

Only IPs in the list can log in. All others are denied. Use this when you know exactly which networks your users should connect from (office, VPN, CI servers).

Blocklist Mode

All IPs can log in except those in the list. Use this to block known-bad actors, abusive ranges, or geographic regions you don't operate in.

Early rejection: The IP check happens before credential verification. A blocked IP receives a 403 Forbidden immediately without the system checking whether the account exists or the password is correct. This prevents IP-blocked clients from performing user enumeration.

Enabling IP Access Control

Enable IP access control by updating your tenant settings. The example below enables allowlist mode with a mix of individual IPs and CIDR ranges — only these addresses will be permitted to log in.

PATCH/api/v1/settings🔒 Auth

Enable IP access control in allowlist mode with permitted addresses.

curl -X PATCH https://id.vyntech.com.au/api/v1/settings \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..." \ -H "Content-Type: application/json" \ -d '{ "ip_access": { "enabled": true, "mode": "allowlist", "addresses": [ "203.0.113.42", "203.0.113.100", "10.0.0.0/8", "172.16.0.0/12", "192.168.1.0/24" ] } }'
Request Body
{
  "ip_access": {
    "enabled": true,
    "mode": "allowlist",
    "addresses": [
      "203.0.113.42",
      "203.0.113.100",
      "10.0.0.0/8",
      "172.16.0.0/12",
      "192.168.1.0/24"
    ]
  }
}

CIDR Range Examples

CIDR notation lets you specify entire network blocks instead of individual IPs. Here's a quick reference for common patterns:

CIDRRangeNotes
10.0.0.0/8All 10.x.x.x addressesPrivate — large corporate networks
172.16.0.0/12172.16.x.x – 172.31.x.xPrivate — medium networks
192.168.0.0/16All 192.168.x.x addressesPrivate — home/small office
203.0.113.0/24203.0.113.0 – 203.0.113.255Specific /24 block (256 IPs)
203.0.113.42/32203.0.113.42 onlySingle IP (equivalent to bare IP)

Switching to Blocklist Mode

If you want to allow all IPs except specific known-bad actors, switch to blocklist mode. Any IP in the list will be denied; all others are permitted.

PATCH/api/v1/settings🔒 Auth

Switch to blocklist mode with known malicious IPs.

curl -X PATCH https://id.vyntech.com.au/api/v1/settings \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..." \ -H "Content-Type: application/json" \ -d '{ "ip_access": { "enabled": true, "mode": "blocklist", "addresses": [ "185.220.101.0/24", "23.129.64.0/24", "198.51.100.50" ] } }'
Request Body
{
  "ip_access": {
    "enabled": true,
    "mode": "blocklist",
    "addresses": [
      "185.220.101.0/24",
      "23.129.64.0/24",
      "198.51.100.50"
    ]
  }
}

Adding & Removing IPs

Updates to the address list are replace-based, not additive. When you PATCH the addresses array, the entire list is replaced with the new value. To add or remove entries, follow this pattern:

  • 1.Read the current settings to get the existing address list
  • 2.Modify the array in your application (add new entries or filter out removed ones)
  • 3.Write the full updated array back via PATCH
PATCH/api/v1/settings🔒 Auth

Replace the full address list (read → modify → write pattern).

# 1. Read current settings CURRENT=$(curl -s https://id.vyntech.com.au/api/v1/settings \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs...") # 2. Add new IP to existing list (using jq) UPDATED=$(echo $CURRENT | jq '.ip_access.addresses += ["198.51.100.0/24"]') # 3. Write back curl -X PATCH https://id.vyntech.com.au/api/v1/settings \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..." \ -H "Content-Type: application/json" \ -d "{\"ip_access\": {\"addresses\": $(echo $UPDATED | jq '.ip_access.addresses')}}"
Request Body
{
  "ip_access": {
    "addresses": [
      "203.0.113.42",
      "203.0.113.100",
      "10.0.0.0/8",
      "172.16.0.0/12",
      "192.168.1.0/24",
      "198.51.100.0/24"
    ]
  }
}

Safety Considerations

⚠️

Risk of locking yourself out

If you enable allowlist mode and forget to include your own admin IP, you'll lose the ability to log in and change the setting. Plan carefully before enabling.

Built-in safeguard: The API respects the current session. Your active access token continues to work until it expires (default 15 minutes), even if your IP is no longer in the allowlist. This gives you a window to revert the change if you make a mistake. Refresh tokens from a blocked IP will fail, so act before your access token expires.

  • Always include your admin IP or CIDR range before enabling allowlist mode.
  • Keep a break-glass API key (with a fixed, known IP) that can bypass restrictions if needed.
  • Test configuration changes in a staging tenant before applying to production.

Combining with Risk Engine

IP access control and the risk engine are complementary security layers that can run simultaneously:

IP Access Control

A hard gate — binary allow/deny based on source IP. Evaluated first. If the IP is blocked, the request is rejected immediately (no risk scoring, no credential check).

Risk Engine

A scoring system — evaluates behavioral signals (device, location, velocity) to detect anomalies from allowed IPs. Runs after the IP check passes.

A typical layered setup: use allowlist mode to restrict logins to your corporate network, then let the risk engine catch anomalies within that network (compromised devices, credential stuffing from inside the VPN, unusual login times).

Best Practices

Always include admin & CI IPs

Before enabling allowlist mode, ensure your admin IP, CI/CD runner IPs, and monitoring service IPs are in the list. Forgetting these causes outages.

Test in staging first

Create a staging tenant, enable IP access control there, and verify that legitimate users can still log in. Only then apply the same config to production.

Use CIDR ranges for office networks

Don't list individual IPs that may change with DHCP. Use the CIDR range assigned to your office or VPN gateway (e.g., 203.0.113.0/24).

Keep a break-glass API key

Maintain a service-account API key from a known, fixed IP that bypasses IP restrictions. Store it securely (vault, secrets manager) for emergency access if you lock yourself out.

What's Next

We use cookies and similar technologies to measure traffic and improve the site. You can choose which categories to allow. Manage Preferences.