> Markdown version of https://tuna.am/en/docs/troubleshooting/errors/access-restricted/. Documentation index: [llms.txt](https://tuna.am/en/llms.txt), full text in one file: [llms-full.txt](https://tuna.am/en/llms-full.txt). Any page is available as Markdown: append `.md` to its URL without the trailing slash.

# Access restricted

The tunnel address opens this page (it is shown in Russian only):

```text
Доступ ограничен
Код ошибки: 403

Разработчик предпочел ограничить доступ к ресурсу для вашего IP-адреса 203.0.113.10, свяжитесь с ним для получения доступа.

```

In English: "Access restricted. Error code: 403. The developer has restricted access to this resource for your IP address 203.0.113.10. Contact them to get access."

This is not a failure: the tunnel is closed to outsiders by its startup flags or rules. What the response looks like depends on the protection method.

## Cause

### Password

The tunnel was started with the [`--basic-auth`](https://tuna.am/en/docs/tunnels/http.md#basic-auth) flag. The browser asks for a username and password. If the visitor doesn't enter them or enters wrong ones, a page with the `401` status opens:

```text
Доступ ограничен
Код ошибки: 401

Разработчик предпочел ограничить доступ к ресурсу, свяжитесь с ним для получения доступа.

```

In English: "Access restricted. Error code: 401. The developer has restricted access to this resource. Contact them to get access."

### IP address or User-Agent

The tunnel was started with the [`--cidr-allow` or `--cidr-deny`](https://tuna.am/en/docs/tunnels/http.md#cidr) flags, and the visitor's IP address didn't pass the check. The page has the `403` status — as in the example at the top, with the visitor's IP address.

The same page, but without an IP address, appears when the `User-Agent` doesn't match the [`--ua-allow` or `--ua-deny`](https://tuna.am/en/docs/tunnels/http.md#user-agent) flags.

The tuna client on the machine running the tunnel runs these checks, so the request never reaches the application.

### Team IP policy

A team admin has denied access to the team's tunnels from the visitor's subnet in [IP policies](https://tuna.am/en/docs/team/ip_policies.md). The Tuna server runs this check, and its `403` page looks different:

```text
Доступ запрещен
Код ошибки: 403

Доступ к туннелю с вашего IP-адреса 203.0.113.10 запрещен, попробуйте написать разработчику.

```

In English: "Access denied. Error code: 403. Access to the tunnel from your IP address 203.0.113.10 is denied. Try contacting the developer."

Sometimes a short `IP not allowed` response with the same status comes back instead of the page.

### Key or webhook signature

The tunnel was started with the [`--key-auth`](https://tuna.am/en/docs/tunnels/http.md#key-auth) or [`--verify-webhook`](https://tuna.am/en/docs/tunnels/http.md#verify-webhook) flag, and the request has no valid key in the `X-Token` header or no valid webhook signature. The response is plain text with the `401` status:

```text
Unauthorized

```

### Traffic policy

A rule in the tunnel's [traffic policy](https://tuna.am/en/docs/traffic-policy.md) denied the request: the [`deny`](https://tuna.am/en/docs/traffic-policy.md#deny), [`restrict_ips`](https://tuna.am/en/docs/traffic-policy.md#restrict_ips), [`basic_auth`](https://tuna.am/en/docs/traffic-policy.md#basic_auth), or `verify_webhook` action. The response has an empty body: `403` for `deny` and `restrict_ips`, `401` for `basic_auth` and `verify_webhook`. You can also set a different status for `deny`.

## What to do

1. Check the flags the tunnel was started with and the traffic policy rules.
2. To let the visitor in, add their subnet to `--cidr-allow`, or give them the username and password from `--basic-auth` or the key from `--key-auth`.
3. If the team IP policy blocked the request, ask a team admin to adjust it in the [dashboard](https://my.tuna.am/team_ip_policies?lang=en).
4. For webhooks, check that the secret in `--verify-webhook-secret` matches the one set at the provider.

If the tunnel isn't yours and someone sent you the link, ask them for access and tell them your IP address if the page shows it.
