# Connections

Source: https://tiltas.openpanel.sh/docs/concepts/connections

> Direct and relayed connections, what the Coordinator and Relays do, and what goes through Tiltas.

Two Devices on your Network talk to each other over WireGuard, encrypted from one Device to the other. They always try to
connect directly first.

> Diagram: on the left, two Devices connect directly over WireGuard. On the right, when no direct path works, the same connection goes through a Relay; it is still encrypted end to end and the Relay cannot read it.

## Direct connections

A **direct connection** goes straight from one Device to the other, across the internet or across your LAN. Devices find
a way through home routers and most firewalls by themselves: each learns its public address from a public STUN server
and tries the paths the other side reports. Nothing has to be opened on your router.

## Relayed connections

When no direct path exists, for example behind a strict company firewall, the two Devices connect through a **Relay**.
The Relay passes the encrypted packets on; it cannot read them, because only the two Devices hold the keys. A Relay
admits only Devices of an active Network.

Relayed traffic is slower than a direct path and counts toward your Plan's [Relay pool](/docs/plans#the-relay-pool);
direct traffic never does. The console shows each connection as **Direct** or **Relayed**, and so do the apps. If a
connection stays relayed, see [Only relayed](/docs/troubleshooting/relayed).

## The Coordinator

The **Coordinator** signs Devices in and tells each one who its peers are: their public keys, addresses, names and the
Access rules. It never carries your traffic. Each Network has its own Coordinator.

## What goes through Tiltas

- **Traffic between your Devices**, and nothing else. Websites, streaming and email take their usual way.
- **Names in your Network's domain**, such as `nas` or `gitea`, are looked up through Tiltas. Every other name is looked
  up the way it always was.
- **A LAN you share** through one of your Devices, only for the Devices a rule allows: see
  [Subnet routers](/docs/access/subnet-routers).

Tiltas sends none of your internet traffic through another Device unless you choose an exit node, which is not offered
in the console yet: see [Exit nodes](/docs/access/exit-nodes).

## Routers and firewalls

**Your router**: nothing to open. Devices only make outgoing connections; the Coordinator and the Relays answer on HTTPS,
port `443`.

**A firewall on the Device itself**: direct connections use UDP. On a Linux server with a host firewall, allow UDP port
`41641` and traffic on the `tiltas0` interface, for example:

```bash
sudo ufw allow 41641/udp
sudo ufw allow in on tiltas0
```

`41641` lets other Devices connect to this one directly; `tiltas0` is where their traffic arrives once connected.

## Where the servers run

The console, the Coordinators and the Relay run on servers in the EU. More in [Security](/docs/security).
