Why DNS matters for Claude Code

The risk: IP changes trigger account blocks

If your VPN disconnects, your proxy changes, or your DNS gets hijacked, your requests to claude.ai may come from an unexpected IP address. This can trigger Anthropic's risk control system, temporarily blocking your account or flagging it for review.

This is especially relevant for developers who:

How Claude Launcher's DNS check works

Before launching any Claude Code session, Claude Launcher resolves claude.ai and compares the result against your configured list of expected IP addresses or CIDR ranges. If the resolved IP does not match, you get a clear warning before any session starts.

DNS Check Passed

claude.ai resolved to 104.18.32.7
Matches allowed range 104.18.0.0/16

DNS Check Failed

claude.ai resolved to 192.168.1.1
Not in allowed IP list. Check your VPN.

Configuring IP rules

Claude Launcher supports both individual IP addresses and CIDR notation for flexible network configuration.

Individual IPs

Add specific IP addresses that claude.ai should resolve to:

104.18.32.7
104.18.33.7
172.64.155.188

CIDR ranges

For broader matching, use CIDR notation to allow entire subnets:

104.18.0.0/16
172.64.0.0/16

How to find the correct IPs

Open a terminal and run nslookup claude.ai while your VPN or proxy is working correctly. Add the resulting IPs to your Claude Launcher configuration. You can also check Cloudflare's published IP ranges since claude.ai uses Cloudflare.

Common scenarios

VPN disconnected

Your VPN drops silently. Without a DNS check, Claude Code would connect from your real IP, potentially triggering risk control. Claude Launcher catches this before any request is made.

DNS hijacking

Some ISPs or network administrators redirect DNS queries. Claude Launcher detects when claude.ai resolves to an unexpected address, which could indicate DNS hijacking or a man-in-the-middle situation.

Switching networks

Moving from home Wi-Fi to a mobile hotspot changes your exit IP. Claude Launcher reminds you to verify your network before launching a session that could be flagged.

Best practices

Related: How to manage multiple Claude Code sessions | Claude Launcher vs Windows Terminal | Claude Launcher vs Warp

Protect your Claude Code sessions

DNS safety check is included free in every edition of Claude Launcher.