IP Whitelists
Restrict project API access to trusted IP addresses and networks
IP whitelists let you restrict project API access to specific IP addresses or networks. Use them to allow requests from your application servers, office network, or VPN while blocking requests from other sources, even when they use a valid API key.
Open Console > Project, select the project you want to configure, and find IP Whitelist.
How the whitelist works
The status next to IP Whitelist shows whether filtering is enabled:
Disabled
The whitelist is empty. Requests are allowed from any IP address, subject to the usual API key and project checks.
Active
At least one entry is saved. Requests must come from a listed address or fall within a listed CIDR range.
Saving the first entry activates the whitelist. Removing the last entry disables it.
Add an IP address or range
Click Add an IP address or range.
Enter one IPv4 address, IPv6 address, or CIDR range.
Click Save.
Send a request from your application to confirm that it can still access the API.

Repeat these steps for each address or network that needs access.
Supported formats
IPv4 address
203.0.113.10
One IPv4 address
IPv6 address
2001:db8::10
One IPv6 address
IPv4 CIDR range
203.0.113.0/24
All IPv4 addresses in that network
IPv6 CIDR range
2001:db8::/64
All IPv6 addresses in that network
These examples are for illustration. Replace them with your own addresses or networks.
CIDR ranges must start at the network address. For example, use 203.0.113.0/24 rather than 203.0.113.10/24. Enter IP addresses directly; hostnames and URLs are not supported.
When a range includes existing IP addresses
If you add a CIDR range that contains individual addresses already in the whitelist, you will be asked to confirm their replacement. The Replace existing IP addresses? dialog will list the affected entries.
Choosing Replace with CIDR will remove those individual entries and save the range instead.
Choosing Keep existing IPs will leave the existing entries unchanged without adding the range.
Saving the range will also allow requests from every other address within it. Only add the range if the entire network should have access.
Duplicate entries and other overlaps with existing addresses or ranges are rejected. Review the existing entries before adding another range. 
Remove an entry or disable the whitelist
Click the Delete icon next to an entry to remove it. The entry is removed without a confirmation dialog.
If other entries remain, requests must still match one of them. To disable the whitelist, remove every entry. The status changes to Disabled.
Troubleshoot blocked requests
If an application is blocked after you activate or change the whitelist:
Confirm that its API key belongs to the project whose whitelist you changed.
Check the public outbound IP used by the application, including any VPN, proxy, or NAT gateway.
Check whether the request uses IPv4 or IPv6 and whether that address matches a saved entry.
Ask a project administrator to add the required address or range, then retry the request.
Changing the whitelist does not require creating a new API key.
Last updated