A web application to identify which Zscaler datacenter an IP address belongs to. This tool helps you understand which Zscaler Cloud Enforcement Node (CEN) location you're connected to.
When connected to Zscaler, you may see an IP address but not know which datacenter location it represents. This tool fetches the latest Cloud Enforcement Node Ranges (CENR) from Zscaler's public API and identifies the datacenter location for any given IPv4 or IPv6 address.
- β¨ Clean, Modern UI - Responsive design that works on desktop and mobile
- π Multi-Cloud Support - Supports all 8 Zscaler clouds:
- zscaler.net
- zscalerone.net
- zscalertwo.net
- zscalerthree.net
- zscloud.net
- zscalerbeta.net
- zscalergov.net
- zscalerten.net
- π IP Lookup - Quickly identify which datacenter an IP belongs to (IPv4 and IPv6 supported)
- πΊοΈ Interactive Map - Visualize datacenter locations on an interactive map using Leaflet
- π Traffic Flow Visualization - See the traffic path from your location to the Zscaler datacenter
- Dual markers showing your location (π) and datacenter (π’)
- Animated traffic flow line with directional arrow
- Auto-fit map to show both locations
- π Distance Calculation - Calculate and display the distance between locations
- Shows distance in kilometers and miles
- Distance label displayed on the map
- π Geolocation - Automatic or manual IP geolocation
- Auto-detect your public IP address
- Optional manual source IP input
- Shows your city and country
- π£οΈ Trace Route Visualization - Map multiple IP addresses as a multi-hop route
- Enter multiple IPs (one per line) to visualize the complete path
- Numbered markers showing each hop in sequence
- Distance calculation between consecutive hops and total route distance
- Animated traffic flow lines connecting all hops
- Export route data (Copy, JSON, CSV, PNG)
- π¦ Docker Support - Easy deployment with Docker
- β‘ Fast & Efficient - Caches Zscaler data to minimize API calls
- π₯ Health Check Endpoint - Monitor application health
- Docker and Docker Compose (recommended)
- OR Node.js 20+ (for local development; see
.nvmrc)
-
Clone this repository:
git clone <repository-url> cd zscaler_datacenters
-
Start the application:
docker-compose up -d
-
Open your browser and navigate to:
http://localhost:3000
By default, Docker Compose binds the app to 127.0.0.1:3000 (localhost only). Change the port mapping in docker-compose.yml if you need to expose it on other interfaces.
-
Install dependencies:
npm install
-
Start the server:
npm start
-
Open your browser and navigate to:
http://localhost:3000
- Select your Zscaler Cloud from the dropdown menu
- Enter a Zscaler IP address to lookup (e.g., 165.225.28.50)
- Optional: Enter your IP address to visualize traffic flow and distance
- Leave blank for auto-detection (works with public IPs)
- Or manually enter any public IP address
- Click "Lookup Datacenter" to find the datacenter
- View results showing:
- Datacenter name and location
- IP range and coordinates
- Your location (if provided)
- Distance between locations (in km and miles)
- Interactive map with traffic flow visualization
- Click the "Trace Route" tab in the navigation
- Select your Zscaler Cloud from the dropdown menu
- Enter multiple IP addresses (one per line) to trace the route
- Click "Trace Route" to visualize the path
- View results showing:
- Each hop with datacenter name, location, and coordinates
- Distance between consecutive hops
- Total route distance in kilometers and miles
- Interactive map with numbered markers and connecting lines
- Export your results using the export buttons:
- π Copy - Copy formatted text to clipboard
- π JSON - Download as JSON file
- π CSV - Download as CSV file
- πΌοΈ PNG - Download map as PNG image
Single IP Lookup:
- Zscaler IP:
165.225.28.50 - Cloud:
zscalerthree.net - Your IP:
8.8.8.8(optional) - Result:
- Datacenter:
Amsterdam II - Your Location:
Ashburn, United States - Distance:
6,209.9 km (3,858.7 miles) - Map showing both locations with traffic flow
- Datacenter:
Trace Route:
- IPs (one per line):
107.207.39.169 165.225.28.50 165.225.80.50 - Cloud:
zscalerthree.net - Result:
- Hop 1:
Phoenixβ Hop 2:Amsterdam II(6,410.5 km) - Hop 2:
Amsterdam IIβ Hop 3:Paris(431.3 km) - Total Distance:
6,841.8 km (4,251.2 miles) - Map showing all hops with numbered markers and connecting lines
- Hop 1:
The application provides a REST API for programmatic access:
Trace a route through multiple IP addresses.
Request Body:
{
"cloud": "zscalerthree.net",
"ips": ["107.207.39.169", "165.225.28.50", "165.225.80.50"]
}Example:
curl -X POST http://localhost:3000/api/trace \
-H "Content-Type: application/json" \
-d '{"cloud":"zscalerthree.net","ips":["107.207.39.169","165.225.28.50"]}'Response:
{
"success": true,
"cloud": "zscalerthree.net",
"totalHops": 2,
"totalDistanceKm": 6410.5,
"totalDistanceMiles": 3983.3,
"hops": [
{
"hopNumber": 1,
"ip": "107.207.39.169",
"datacenter": "Phoenix",
"city": "Phoenix",
"continent": "Americas",
"range": "107.207.38.0/23",
"latitude": "33.448376",
"longitude": "-112.074036"
},
{
"hopNumber": 2,
"ip": "165.225.28.50",
"datacenter": "Amsterdam II",
"city": "Amsterdam II",
"continent": "EMEA",
"range": "165.225.28.0/23",
"latitude": "52.367573",
"longitude": "4.904139",
"distanceFromPrevKm": 6410.5,
"distanceFromPrevMiles": 3983.3
}
]
}Lookup an IP address in a specific Zscaler cloud.
Parameters:
cloud(required) - Zscaler cloud name (e.g.,zscalerthree.net)ip(required) - IP address to lookup (e.g.,165.225.28.50)sourceIp(optional) - Your source IP address for traffic flow visualization
Example:
curl "http://localhost:3000/api/lookup?cloud=zscalerthree.net&ip=165.225.28.50&sourceIp=8.8.8.8"Response:
{
"success": true,
"ip": "165.225.28.50",
"cloud": "zscalerthree.net",
"datacenter": {
"name": "Amsterdam II",
"city": "Amsterdam II",
"country": "EMEA",
"latitude": 52.367573,
"longitude": 4.904139,
"ipRanges": ["165.225.28.0/23"]
},
"matchedRange": "165.225.28.0/23",
"continent": "EMEA",
"clientIp": "8.8.8.8",
"clientCity": "Ashburn",
"clientCountry": "United States",
"clientLatitude": 39.03,
"clientLongitude": -77.5,
"distanceKm": 6209.9,
"distanceMiles": 3858.7
}Get a list of all supported Zscaler clouds.
Health check endpoint for monitoring application status.
Response:
{
"success": true,
"status": "healthy",
"version": "1.4.1",
"timestamp": "2026-02-21T12:00:00.000Z",
"cacheSize": 3
}Get the network path from a user's device to an application using the Zscaler Digital Experience (ZDX) API.
Prerequisites:
- ZDX API credentials configured (
ZDX_CLIENT_IDandZDX_CLIENT_SECRETenvironment variables) - User must have an active ZDX-monitored device
- Application must have a Cloud Path Probe configured in the ZDX portal
Request Body:
{
"cloud": "zdxcloud",
"userEmail": "user@example.com",
"appName": "Office 365"
}Example:
curl -X POST http://localhost:3000/api/zdx/userpath \
-H "Content-Type: application/json" \
-d '{"cloud":"zdxcloud","userEmail":"user@example.com","appName":"Office 365"}'Response:
{
"success": true,
"userEmail": "user@example.com",
"appName": "Office 365",
"deviceId": "device-123",
"path": [
{
"hop": 1,
"ip": "192.168.1.1",
"latency": 2.5,
"location": "United States"
},
{
"hop": 2,
"ip": "165.225.28.50",
"latency": 15.3,
"location": "Netherlands"
}
]
}zscaler_datacenters/
βββ server.js # Express backend server
βββ utils/
β βββ ip.js # IP / CIDR helpers (IPv4 + IPv6)
β βββ distance.js # Haversine distance calculation
βββ public/ # Frontend static files
β βββ index.html
β βββ styles.css
β βββ app.js
βββ tests/
β βββ unit/ # Unit tests (ip, distance)
β βββ integration/ # API integration tests
βββ .github/workflows/ci.yml # Lint + test CI
βββ openapi.yaml # OpenAPI 3 specification
βββ package.json
βββ Dockerfile # Node.js 20 Alpine image
βββ docker-compose.yml # Binds 127.0.0.1:3000 by default
βββ .nvmrc # Pins Node.js 20
βββ .env.example
βββ requirements.txt # Python deps for ZDX scripts
βββ zdx_geo_path.py
βββ zdx_oneapi_geopath.py
βββ README.md
βββ README_PYTHON.md
βββ CONTRIBUTING.md
βββ CHANGELOG.md
βββ TODO.md # Open backlog + completed work
- Backend: Node.js, Express
- Frontend: HTML5, CSS3, Vanilla JavaScript
- Mapping: Leaflet.js v1.9.4 with Polyline Decorator v1.6.0 for traffic flow visualization
- Export: html2canvas v1.4.1 for PNG map export
- Geolocation: ip-api.com for IP geolocation
- Containerization: Docker, Docker Compose
- External API: Zscaler Config API
PORT- Server port (default: 3000)CACHE_DURATION- How long to cache Zscaler data in milliseconds (default: 3600000 - 1 hour)ALLOWED_ORIGINS- Comma-separated list of allowed CORS origins (default: allow all). Example:https://example.com,https://app.example.comTRUST_PROXY- Set to a hop count (e.g.1) or a named preset (loopback,linklocal,uniquelocal) when deploying behind a reverse proxy (nginx, Traefik, etc.) so thatX-Forwarded-Forheaders are trusted correctly for rate limiting and IP detection. Leave unset for direct/public deployments to prevent IP-spoofing.SSL_KEY_PATH- Path to SSL private key file for HTTPS (optional)SSL_CERT_PATH- Path to SSL certificate file for HTTPS (optional)ZDX_CLIENT_ID- ZDX API client ID (required for/api/zdx/userpathendpoint)ZDX_CLIENT_SECRET- ZDX API client secret (required for/api/zdx/userpathendpoint)
Modify docker-compose.yml to customize:
- Port mappings
- Environment variables
- Resource limits
- Ensure port 3000 is not in use by another application
- Check Docker is running:
docker ps
- Verify the IP address format is correct (IPv4 or IPv6)
- Ensure you've selected the correct Zscaler cloud
- The IP might not belong to any Zscaler datacenter
- Restart the application to refresh the cache
- Or wait for the cache to expire (default: 1 hour)
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use this tool for your needs.
- Zscaler for providing the public CENR API
- Built to solve a real-world problem with Zscaler connectivity visibility
For issues or questions, please open an issue on the repository.