Network limits control outbound internet access from sandboxes. Each sandbox runs behind a firewall that restricts which external IP addresses and domains it can reach, preventing untrusted code from exfiltrating data or contacting arbitrary hosts.
Default network policies are applied automatically based on your organization's tier. You can also configure access per sandbox using these parameters:
networkAllowList for IPv4 CIDR ranges
domainAllowList for domains and wildcard domains
networkBlockAll to block all outbound traffic
outboundProxyUrl to route sandbox HTTP(S) traffic through an upstream proxy
Network limits are automatically applied to sandboxes based on your organization's billing tier. This provides secure and controlled internet access for development environments:
Tier 1 & Tier 2: Network access is restricted and cannot be overridden at the sandbox level. Organization-level network restrictions take precedence over sandbox-level settings. Even with networkAllowList or domainAllowList specified when creating a sandbox, the organization's network restrictions still apply
Tier 3 & Tier 4: Full internet access is available by default, with the ability to configure custom network settings
Essential services are available on all tiers and include services essential for development.
Set networkAllowList, domainAllowList, or networkBlockAll when creating a sandbox to control which external hosts the sandbox can reach. The options are mutually exclusive. Set at most one non-empty value. Sending a conflicting combination returns a 400 error. Empty-string allow lists count as unset and never conflict.
from daytona import CreateSandboxFromSnapshotParams, Daytonadaytona = Daytona()# Allow access to specific IP addresses (Wikipedia, X/Twitter, private network)sandbox = daytona.create(CreateSandboxFromSnapshotParams( network_allow_list='208.80.154.232/32,199.16.156.103/32,192.168.1.0/24'))# Allow access to specific domainssandbox = daytona.create(CreateSandboxFromSnapshotParams( domain_allow_list='example.com,*.daytona.io'))# Or block all network accesssandbox = daytona.create(CreateSandboxFromSnapshotParams( network_block_all=True))
This operation requires the WRITE_SANDBOXES permission. Organizations on Tier 3 and Tier 4 can change outbound firewall policy on a running sandbox. The API applies the new rules and persists them on the sandbox. The sandbox keeps running; stop or start are not required.
Organizations on Tier 1 or Tier 2 cannot override network policy at the sandbox level, and the API returns an error in that case.
Sending networkAllowList as an empty string clears a stored CIDR allow list
Sending domainAllowList as an empty string clears a stored domain allow list
Sending networkBlockAll: true blocks all outbound traffic and clears both the stored CIDR and domain allow lists
Sending only networkBlockAll: false removes the block-all rule and clears both the stored CIDR and domain allow lists
# Block all outbound traffic (clears the CIDR allow list)sandbox.update_network_settings(network_block_all=True)# Remove the block-all rule and clear the CIDR allow listsandbox.update_network_settings(network_block_all=False)# Apply or replace a CIDR allow list (implies not blocking all)sandbox.update_network_settings( network_allow_list='208.80.154.232/32,192.168.1.0/24')# Apply or replace a domain allow listsandbox.update_network_settings( domain_allow_list='example.com,*.daytona.io')# Clear a stored CIDR allow list (empty string). Outbound traffic still follows `network_block_all`.sandbox.update_network_settings(network_allow_list='')# Clear a stored domain allow listsandbox.update_network_settings(domain_allow_list='')
An outbound proxy sends a sandbox's HTTP(S) egress through a proxy you control. You can set the outboundProxyUrl parameter when creating a sandbox to specify the upstream proxy URL Daytona should chain to. Daytona routes matching traffic through its egress proxy to that upstream instead of dialing destinations directly.
Daytona stores the proxy URL on the sandbox (encrypted at rest) and sets HTTP_PROXY (and HTTPS_PROXY) inside the sandbox.
HTTP(S) clients that respect those variables send traffic through Daytona's egress proxy, which chains to your upstream.
Clients that do not respect HTTP_PROXY are blocked at egress.
The URL may use http or https and may include credentials in the userinfo, for example http://user:pass@proxy.example.com:3128. Implement domain allow listing on your own proxy to control which destinations the sandbox can reach.
Constraint
Value
Schemes
http, https
Max length
2048 characters
Host
Must not be localhost or a private, loopback, or link-local IP literal
from daytona import CreateSandboxFromSnapshotParams, Daytonadaytona = Daytona()sandbox = daytona.create(CreateSandboxFromSnapshotParams( outbound_proxy_url='http://user:pass@proxy.example.com:3128',))# Returned on single-sandbox readssandbox = daytona.get(sandbox.id)print(sandbox.outbound_proxy_url)
The domain allow list is a comma-separated list of DNS domains. When a domain allow list is set, outbound traffic is limited to the listed domains and other external domains are blocked.
Domains only: use hostnames such as example.com or api.openai.com. Do not include protocols, paths, ports, or query strings
Wildcards supported: prefix a domain with *. to allow the base domain and its subdomains, for example *.daytona.io
Max 20 entries: the list cannot contain more than 20 comma-separated items
Whitespace is ignored: entries are trimmed, so spaces around commas are ok
Clear on update: send domainAllowList as an empty string when updating network settings to clear a stored domain allow list
# Test HTTP connectivity to allowed addressescurl -I https://208.80.154.232# Test HTTP connectivity to allowed domainscurl -I https://example.com# Test package manager access (allowed on all tiers)apt update # For Ubuntu/Debiannpm ping # For Node.jspip install --dry-run requests # For Python