You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Google Cloud VPC: Get Google APIs and Services IP Ranges
2
+
3
+
This sample shows how to retrieve Google's public IP range feeds and compute the IP address ranges (CIDRs) used exclusively for Google APIs and default domain services (such as `*.googleapis.com`).
4
+
5
+
It calculates the IP set difference `(goog.json - cloud.json)` to separate default Google API domains from customer Google Cloud resource IPs, which is useful for configuring VPC firewall rules, custom routing, and [Private Google Access](https://cloud.google.com/vpc/docs/private-google-access).
6
+
7
+
## Setup
8
+
9
+
1. Create and activate a Python virtual environment:
10
+
11
+
```bash
12
+
python3 -m venv env
13
+
source env/bin/activate
14
+
```
15
+
16
+
2. Install the dependencies needed to run the sample:
0 commit comments