# tcp

## Usage

```bash
bdy tunnel tcp|TCP [options] [host:port]
```

## Arguments

| **Argument** | **Description** |
| :--- | :--- |
| `host:port` | Target address to redirect traffic to. Host is optional and by default local machine. Port is by default 80 (optional) |

## Options

| **Option** | **Description** |
| :--- | :--- |
| `-r, --region <region>` | override default region ("eu", "us", "as") |
| `-w, --whitelist <cidrs...>` | Whitelist provided IP CIDRs. Use "*" to allow all |
| `-n, --name <name>` | Name of the tunnel |
| `-t, --timeout <seconds>` | Enforce connection timeout in seconds |
| `--token <token>` | Token to authorize agent |
| `-h, --help` | display help for command |

## Examples

### Start tcp tunnel on port 22

```bash
bdy tunnel tcp 22
```

### Start named tcp tunnel with whitelist

```bash
bdy tunnel tcp 80 -n name -w 1.1.1.1/27
```


---
Original source: https://buddy.works/docs/cli/tunnel/tcp