---
title: "pols egress"
description: "Replace a sandbox's outbound network policy, at once if it runs"
---

<!-- Generated by scripts/reference.mjs from the pols CLI's --help. Do not edit; run `npm run reference:sync`. -->

Replace a sandbox's outbound network policy: MODE is default (public internet), allowlist (only `--allow` destinations) or none.
It applies at once to a running sandbox, to new connections, and stays for later
starts. Host names (github.com, or \*.pypi.org for every name below pypi.org)
need a Cloud Hypervisor sandbox; the sandbox's DNS then resolves only them, and
the addresses they resolve to become reachable.

## Usage

```text
pols egress SANDBOX MODE [--allow DEST]... [flags]
```

## Examples

```sh
pols egress braveotter allowlist --allow github.com --allow '*.pypi.org'
pols egress braveotter allowlist --allow 203.0.113.0/24 --allow api.anthropic.com
pols egress braveotter none
```

## Flags

```text
    --allow stringArray   CIDR prefix or host name (example.com, *.example.com) the sandbox may reach (repeatable; requires MODE allowlist)
-h, --help                help for egress
```

The [global flags](/docs/reference/cli/#global-flags) work with this command too.
