# Port Forwarding

Port forwarding allows forwarding a port from the server to a connected user this can be done in the users settings. Port forwarding can be enabled for a user at any time including while the user is connected. The changes to port forwarding will happen immediately and don't require the user to reconnect or the server to be restarted. Multiple ports can be forwarded using a comma separated list. Below are some examples of port forwarding options.

![](/files/bAwgc3DYZLnqMBAZ5cPx)

### Examples

| Setting         | Description                                                       |
| --------------- | ----------------------------------------------------------------- |
| `1024`          | Forward both tcp and udp port 1024                                |
| `80/tcp`        | Forward tcp port 80                                               |
| `1000-2000`     | Forward tcp and udp ports in range 1000 to 2000                   |
| `1000-2000/udp` | Forward udp ports in range 1000 to 2000                           |
| `1000:100`      | Forward tpc and udp port 1000 on the server to the users port 100 |
| `8000:80/tcp`   | Forward tcp port 8000 on the server to the users port 80          |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pritunl.com/kb/vpn/users/port-forwarding.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
