> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bow.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Network and security

> How sandboxes are isolated, what they can reach, and how to run them behind a corporate proxy or with internal hosts.

Code in a sandbox is written by a model. BOW treats it as untrusted and limits what it can touch.

## What a sandbox is isolated from

* **Your data sources.** A sandbox holds none of their credentials. Agents query connected data with their normal tools, outside the sandbox.
* **BOW itself.** Sandboxes run on separate servers, never on the BOW server. A sandbox cannot connect to BOW or to the server it runs on.
* **Other sandboxes.** Sandboxes on the same server cannot reach each other. Each belongs to one report.
* **The server's kernel, with gVisor.** On a compute that shows **Strong isolation**, sandboxes run under gVisor, which puts a second kernel between the code and the server. On a compute with **Standard isolation** they are ordinary containers. Set **Require strong isolation** on an environment to run it only where gVisor is present.

Each sandbox also runs with a read-only root filesystem, with all Linux capabilities dropped, with a limit on the number of processes, and with the CPU, memory and disk limits of its environment. A run that uses more memory than the limit can stop the whole sandbox; its files are kept and the next run starts it again.

## What a sandbox can reach

A sandbox has no direct route out. All outbound traffic goes through an egress proxy that BOW runs on the same server, and the proxy applies the environment's [network policy](https://docs.bow.ai/sandboxes/environments.md#network-policy):

| Policy | Reachable |
| - | - |
| **No network** | Nothing |
| **Allowed domains only** | The domains under **Allowed outbound connections** in the Sandbox settings |
| **Full internet** | Any public address |

Only HTTP and HTTPS work. SSH, database connections and other raw connections do not, under any policy.

These are refused under every policy, whatever an environment allows:

* The server's own addresses, and BOW's address.
* The sandbox network itself.
* Loopback and link-local addresses, which include cloud metadata endpoints.
* Private and internal addresses, unless the environment lists them under **Internal networks**.

Every domain a sandbox reached or was refused is recorded. See the **Domain log** in a [sandbox's details](https://docs.bow.ai/sandboxes/manage.md#details).

## Internal networks

To let sandboxes reach something inside your network, such as an internal package mirror or an internal API, list its address or range under **Internal networks** on the environment:

```
10.20.30.40, 10.50.0.0/16
```

Those addresses are then reachable under any network policy, including **No network**. A range can be as wide as a /8. Loopback and link-local ranges are never accepted.

> [!WARNING]
>
> Code run in these sandboxes can connect to anything in these ranges and can send report data there. Grant such an environment only to people who may reach those systems.

## Corporate networks

These are set per compute, in its form. See [Compute](https://docs.bow.ai/sandboxes/compute.md#corporate-networks).

### An outbound proxy

If the server reaches the internet only through your own proxy, enter its address under **Outbound proxy**, with a user name and password if it needs a login. BOW's egress proxy then sends allowed traffic on through yours. The network policy is still applied first, on the server.

Bootstrap pulls images with the server's Docker daemon, which has its own proxy settings. If pulling fails behind a proxy, configure the proxy for Docker on the server, or preload the images.

### TLS inspection

If your network re-signs HTTPS traffic, paste the PEM certificates of your certificate authority under **Extra CA certificates**. BOW puts them in every sandbox on that compute and points the common tools at them, so Python, `pip`, `curl`, Node and `git` trust them.

### Restricting the sandbox port

BOW reaches sandboxes through one port on the server, 8443 by default, over TLS with a certificate BOW pins at bootstrap. Each sandbox also has its own token. Enter BOW's address under **BoW address** to let only that address connect to the port.

### Air-gapped servers

For a server that cannot pull images, load BOW's images and your environment images on it yourself and tick **Images are preloaded (air-gapped)**. See [Images](https://docs.bow.ai/sandboxes/compute.md#images).

## How BOW reaches a compute

* **SSH**, with a key BOW generates or you provide. Private keys and passwords are encrypted at rest and never shown again.
* **A pinned host key.** BOW connects only to the server whose fingerprint an admin confirmed. If the key changes, BOW refuses to connect until an admin confirms the new one.
* **Fixed commands.** BOW runs a fixed set of commands on the server. Nothing a model wrote is ever part of a command line there; model-written code runs only inside a sandbox.

## What to decide as an admin

| Decision | Safer choice |
| - | - |
| Which server | One dedicated to sandboxes, with gVisor installed |
| Network policy | **No network** or **Allowed domains only**; **Full internet** only where needed, with **Ask before a run** |
| Internal networks | The narrowest range that works, on an environment granted to few people |
| Shared volumes | Read-only, or **Each report gets its own folder** |
| Who gets **Manage Sandboxes** | Few people. It lets BOW run commands as root on the sandbox servers on their behalf |
| Who gets **Use Agent Sandbox** | The roles that need to run code, each granted only the environments it needs |

## Related

* [Environments](https://docs.bow.ai/sandboxes/environments.md)
* [Compute](https://docs.bow.ai/sandboxes/compute.md)
* [Roles & permissions](https://docs.bow.ai/users/roles-and-permissions.md)
* [PII protection](https://docs.bow.ai/observe-and-govern/pii-protection.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.