Skip to content

Network Profiles

Network profiles are pre-built allow/deny lists for common configurations. Pass network_profile= at sandbox creation to apply one without having to assemble the rules yourself.

Available profiles

ProfileDescriptionMode
unrestrictedNo filtering — sandbox can reach any hostAllow-all
locked-downAir-gapped — no external network at allDeny-all
claude-codeAnthropic API + PyPI + npm + GitHub + crates.ioAllow-list
openaiOpenAI API + PyPI + npm + GitHubAllow-list
data-scienceHuggingFace + PyPI + GitHub + S3 + GCS + condaAllow-list
web-devnpm + jsDelivr + cdnjs + Google Fonts + GitHubAllow-list
from isorun import Sandbox
# Locked-down — sandbox can't reach anything outside the runner.
with Sandbox("python", network_profile="locked-down") as sb:
out = sb.exec("curl -m 2 https://example.com")
assert out.exit_code != 0 # connection blocked
# Claude-code profile — agent can reach Anthropic + package registries.
with Sandbox("python", network_profile="claude-code") as sb:
sb.exec("pip install anthropic") # works
sb.exec("curl https://api.anthropic.com/v1/models -H 'x-api-key: ...'") # works
out = sb.exec("curl -m 2 https://random-site.com")
assert out.exit_code != 0 # blocked

Mixing with explicit allow/deny

network_profile and the allow= / deny= keyword args are mutually exclusive — pick one. If a profile is almost what you want, copy its rules and tweak.

Profile internals

Profiles are server-side; the SDK just passes the name. The runner’s egress enforcer (built on nfqueue + per-VM iptables) blocks all outbound traffic from the sandbox’s TAP device that doesn’t match the allow list. DNS for allow-listed hostnames is resolved at policy install time and refreshed on connection setup.

See Network Filtering for the raw allow/deny list shape and Endpoint Rules for per-method/per-path filtering.