OmniscioGuidesNo internet route (EHOSTUNREACH)
Claude Code: no internet route (EHOSTUNREACH)
Last checked against Anthropic's documentation on November 17, 2026. By the Omniscio team. Updated .
What is the exact message?
No internet route — check your connection or VPN (EHOSTUNREACH)Anthropic's error reference groups it with the messages that mean a request never reached the API.
What does EHOSTUNREACH mean?
The system found the address and then found no route to send the packet down. A firewall rule, a VPN that does not carry this host, or a machine with no working default route all produce it.
That is the whole difference from ENOTFOUND, where the name never turned into an address at all. If your message says ENOTFOUND, the ENOTFOUND guide is the one to follow.
Why there is no route
- No internet access. An ordinary dropped connection, a Wi-Fi network with a captive portal, or a machine that has just changed networks.
- A VPN that blocks
api.anthropic.com. The one you can test in a minute: run the check below with the VPN off. - A required corporate proxy that is not configured. If the network only reaches the outside through a proxy, the route does not exist until
HTTPS_PROXYsays so. - A stale tunnel left by a VPN. On macOS, Anthropic names a disconnected or uninstalled VPN client that leaves a tunnel interface or routing rule behind. The first three are the causes Anthropic lists for this message; this fourth is its macOS note.
How do I fix it?
- Reproduce it outside Claude Code. Run
curl -I https://api.anthropic.comin the shell you start Claude Code from, and read the error it prints. - Try again with the VPN off. If curl succeeds without it, the VPN is dropping the host. Reconnect it, or ask its administrator to allow
api.anthropic.com. - On macOS, remove a VPN you no longer use. Skip this unless you have disconnected or uninstalled a VPN: Anthropic says one can leave a tunnel and a routing rule behind. Removing that VPN in System Settings removes the extension it left, which the raw interface list cannot tell you on its own.
- Set the proxy if your network needs one. If other tools on this machine only reach the internet through a company proxy, so does Claude Code: export
HTTPS_PROXYbefore you launch it, and have the proxy allow the hosts Anthropic lists.
How do I know it is fixed?
- The curl check returns a status line such as
HTTP/2 200instead of a routing error. - Claude Code's next request gets an answer rather than the same line.
- If curl passes and Claude Code still fails, the session was started with a different environment. Restart Claude Code from that same shell.
Where these answers come from
- The message, quoted word for word, and the three causes Anthropic lists for it: Anthropic's error reference, read November 17, 2026.
- The macOS stale-tunnel note and the routing check: the same error reference entry, read the same day.
- The required host list and the proxy variables: Network configuration, read November 17, 2026.
Common questions
Is this the same as no internet?
The message names both, and the difference points at the fix. No internet means the connection itself is gone. A route error means the connection may be fine and the way to this one address is not, which is what a VPN block or a missing proxy does.
Could the API itself be down?
Anthropic's status page is the place to check. A routing error on your side looks nothing like an outage message from the API, so check the curl test first.
Does this affect other Claude Code sessions on this machine?
The route belongs to the machine, so yes: every session on it fails the same way until the network path is fixed.
What if curl works but Claude Code still fails?
Then the environment differs. Proxy and certificate variables are read once at startup, so start Claude Code from the shell where the check passed instead of from an app launcher.