Repository navigation
Conversation
… through the firewall Claude Code's network requirements list platform.claude.com (OAuth token exchange, refresh and revocation, for claude.ai accounts too, plus the first-run connectivity check), claude.ai (account auth) and downloads.claude.ai (plugin executables). The firewalls allowed only api.anthropic.com, so a downstream project had to add all three to its allowed-domains.txt. Added to the claude-code image's defaults, the claude-bun firewall and this repo's own sandbox, with both READMEs updated.
… firewalls Neither host is in Claude Code's network requirements any more, and nothing in the images contacts them: the 2.1.332 CLI binary holds no statsig host, the VS Code extension's JS names neither, and the CLI's only Sentry host is its ingest DSN (o1158394.ingest.us.sentry.io), which resolves to other IPs that the sentry.io entry never opened. The entries only let the agent reach statsig.com's website and Sentry's web app and API. They came from the upstream reference script, which still lists them; the comment says the list follows the docs instead.
"Sandbox Authentication" and two devcontainer.json comments said the firewall blocks the browser login. The browser half runs on the host; the container's half is the token exchange at platform.claude.com, which answers through the firewall (it shares api.anthropic.com's IP, so it did before this branch too). The token injection stays the documented path, for the reason that holds: a setup-token token can only make model requests, while a sign-in leaves a full claude.ai login in ~/.claude for an agent running with prompts skipped.
The firewall comment said Claude Code no longer uses sentry.io, but the CLI still reports errors to a Sentry ingest host. What holds is that the sentry.io entry never carried that traffic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The sandbox firewalls now allow
platform.claude.com,claude.aianddownloads.claude.ai, and no longer allowstatsig.comandsentry.io. This brings them in line with Claude Code's documented network requirements.Why
Claude Code's network requirements list these Anthropic hosts besides the API:
platform.claude.com: OAuth token exchange, refresh and revocation, for claude.ai accounts too, and the first-run connectivity check.claude.ai: claude.ai account authentication.downloads.claude.ai: plugin executable downloads.A downstream project had to add all three to its
allowed-domains.txt. Every Claude Code container needs them.The table no longer lists
statsig.comorsentry.io. Nothing in the images contacts them either:o1158394.ingest.us.sentry.io. It resolves to different IPs, so thesentry.ioentry never carried that traffic.Both entries only let the agent reach statsig.com's website and Sentry's web app and API. They came from Anthropic's reference
init-firewall.sh, which still lists them.Changes
claude-code/.devcontainer/init-firewall.sh,claude-bun/.devcontainer/init-firewall.sh,.devcontainer/claude-sandbox/init-firewall.sh: the three hosts are added and the two are removed. The claude-code script's comment says the list follows the docs table, not the upstream reference, so a future upstream sync doesn't add the hosts back.claude-code/README.md: the firewall defaults sentence names the new hosts. "Sandbox Authentication" no longer says the firewall blocks sign-in. The token stays the documented path because it can only make model requests, while a sign-in leaves a full claude.ai login in~/.claudewhere the agent can read it.claude-code/.devcontainer/claude-sandbox/devcontainer.jsonand.devcontainer/claude-sandbox/devcontainer.json: theCLAUDE_CODE_OAUTH_TOKENcomments give that same reason.claude-bun/README.md: the allowed-services table gains a "Claude sign-in and downloads" row and loses the Sentry and Statsig rows.Notes
claude.aiandplatform.claude.comresolve to 160.79.104.10, the IPapi.anthropic.comalready opened. They add no new address, and sign-in already worked through the firewall before this PR.downloads.claude.aiadds 35.190.46.17. That address serves only thedownloads.claude.ai/downloads.claude.comcertificate, whatever SNI is sent, so it is a dedicated Google Cloud forwarding rule, not a shared CDN address. claude-code template: the sandbox firewall allows whole shared CDN IPs, so each allowlisted CDN host likely opens unrelated sites #296 doesn't apply to it.claude-codescript and this repo's sandbox copy over the published sandbox image withNET_ADMIN/NET_RAW. Both exit 0 and pass their own checks. Results:platform.claude.comtoken endpoint 400,claude.ai403 (Cloudflare challenge, so reached),downloads.claude.ai200,statsig.com,sentry.ioand the Sentry ingest host refused.storage.googleapis.com(plugin install counts in/plugin) and the two Datadog telemetry hosts. All three are optional, andstorage.googleapis.comis Google's shared front end (claude-code template: the sandbox firewall allows whole shared CDN IPs, so each allowlisted CDN host likely opens unrelated sites #296). SettingDISABLE_TELEMETRYorCLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFICwould also turn off feature flags, so neither is set.bash -nandshellcheck -S warningpass on all three scripts, which stay100755. Bothdevcontainer.jsonfiles parse. No CI orverify-image.shline asserts the domain list.Troubleshooting.md"Claude Code authentication" still recommends the token.allowed-domains.txt.