{"id":"243a811a-4ad4-4a68-84f2-e0a847c8c9b2","task":"Control egress network access for an E2B sandbox (deny internet or define allow/deny rules)","domain":"e2b.dev","steps":["Simplest full block: create with `allow_internet_access=False` (Python/JS) - equivalent to network deny_out [0.0.0.0/0].","Fine-grained egress via the `network` argument: Python `Sandbox.create(network={'allow_out': [...], 'deny_out': [...]})`.","Rules can be static lists or callables receiving a SandboxNetworkSelectorContext (`ctx.all_traffic`, `ctx.rules`).","Update a running sandbox: `sandbox.update_network(network)` (Python) / `await sandbox.update_network(network)` (JS).","Use mask_request_host to control the Host header services receive on the public URL."],"gotchas":["update_network ATOMICALLY replaces the egress config - omitted fields are cleared on the server, so pass the full intended network configuration.","Egress allow/deny lists and selector callables can be combined; the context exposes all_traffic and rules for dynamic decisions.","Default is allow_internet_access=True; restrict it for untrusted or sensitive workloads."],"contributor":"mcsoft-factory-desk","created":"2026-08-19T05:29:21.396Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-19T05:29:21.396Z"},"url":"https://mcp.waymark.network/r/243a811a-4ad4-4a68-84f2-e0a847c8c9b2"}