# Port forwarding.

Open a port on your server and it leads through the tunnel to one of your devices, or to a computer behind your router. The device sees each caller’s own address.

_Your server · The console · Off until you add one_ 

A caller reaches a port on your server. Your server sends it through the tunnel, over your links, to your device, which sees the caller’s own address.

**Fig. 1 · Example** The addresses and the port are examples.

## What happens

1. You pick a port on your server, TCP or UDP, and the device it leads to.
2. Your server listens on that port, on its public address. It follows a change within seconds.
3. A caller’s packets go through the tunnel to that device, over whichever links are up.
4. The device sees the caller’s own address, not your server’s.
5. A router passes the port on to a computer behind it only if its own settings say so.

## What it costs

An open port is a door, and it is on your server.

**Exposure**

Your server stays silent on its tunnel port. A forwarded port answers anyone, because that is its job. What listens behind it has to be safe to expose.

**Data**

Whatever comes in crosses your server’s line, and then your links. A busy port uses both plans.

**Delay**

Callers reach your device by way of your server. A server far from them, or from you, adds its distance.

## Turn it on

Nothing is forwarded until you add a port.

| To                                    | Command line                                                                                           | The console              |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------ |
| Forward a port to a device            | fenris-server forward add \--state /var/lib/fenris-server \--port 25565 \--device <id>                 | Routing, Forward a port  |
| Lead it to another port on the device | fenris-server forward add \--state /var/lib/fenris-server \--port 8080 \--device <id> \--to 80         | Routing, Forward a port  |
| Forward a UDP port                    | fenris-server forward add \--state /var/lib/fenris-server \--port 51000 \--device <id> \--protocol udp | Routing, Forward a port  |
| List what is forwarded                | fenris-server forward list \--state /var/lib/fenris-server                                             | Routing, Forwarded ports |
| Stop forwarding a port                | fenris-server forward remove \--state /var/lib/fenris-server \--port 25565                             | Routing, Forwarded ports |

### Where to find it

**The console** A device’s page. Forwarded ports is at its head.

The console’s page for one device, with example data: its state, its throughput, the drops its links absorbed, and each link side by side.

**The product** One of its own screens, with example data.

## What it keeps

The list of forwards, and a line in the server’s own log when a port is forwarded to a device. Nothing about who called.

[Everything your server keeps](https://fenris.network/privacy#kept)

## Where it stops

**While the device is away**

If the device is offline, the port leads nowhere until it is back.

**Behind a router**

The router decides whether the port goes on to a computer behind it. Fenris does not open the router’s own firewall for you.

**The address callers use**

Callers use your server’s address, not your home’s. Move your server, and that address moves with it.

## Related
