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

# Target Behind a Tunnel

> Hosts inside the user's network run a Tunnel out to Telnyx, so an Agent Gateway instance reaches the targets in a routed subnet.

> [!WARNING]
>
> **Preview.** Not available yet.

One or more hosts inside the user's network run a [Tunnel](https://developers.telnyx.com/docs/network/tunnel.md) out to Telnyx. A route sends the target's subnet to the tunnel, and the Agent Gateway instance reaches each target there at its own address. The user's router and firewall need no change.

## Run the Tunnel

Create the tunnel. The output carries its token once:

```bash Workstation theme={null}
telnyx-edge tunnel create acme-hq-dc
```

Each host runs the tunnel process with the token:

```bash Tunnel host theme={null}
telnyx-edge tunnel run --token tnl_…
```

Every host that runs the token serves the tunnel.

## Route the Subnet

A [route](https://developers.telnyx.com/docs/network/tunnel/features/routes.md) on the instance's [*Network*](https://developers.telnyx.com/docs/network/overview.md) sends the target's subnet to the tunnel:

```bash Workstation theme={null}
telnyx-edge network route add acme-hq 10.60.0.0/16 --tunnel acme-hq-dc
```

## Add the Target

[`POST /v2/agent_gateways/{id}/mcp_servers`](https://developers.telnyx.com/api-reference/agent-gateway-mcp-servers/add-an-mcp-server) adds the target by its own address:

```json theme={null}
{
  "name": "orders",
  "url": "http://10.60.3.7:9000/mcp",
  "auth": { "type": "api_key", "value": "example-orders-key" }
}
```

The target sees each request from the tunnel host's address.
