Firewall and network requirements
The outbound connections a Peerlify device makes, so you can allow them on a firewall — and what's optional.
Updated · ·By Ivan Vyshniak
Nothing on this page changes with your selection.
A Peerlify device only makes outbound connections. You don't need to open any inbound ports.
Outbound connections
| Purpose | Protocol and port | Destination | Required |
|---|---|---|---|
| Control plane | TCP 443 (HTTPS) | control-plane.peerlify.com | Yes |
| Control plane fallback | TCP 31202 | 143.198.32.171 | When the main address can't be reached |
| Relays | TCP 5879, then 443, then 80 | Peerlify's relays (addresses sent by the control plane) | Yes; at least one of the three ports |
| Public address discovery (STUN) | UDP 3478 | The device's home relay | For direct connections |
| Direct connections | UDP, from one local port to any port | Other devices' public, LAN or IPv6 addresses | No; without it, traffic uses relays |
| Port mapping | UDP 5351 (NAT-PMP, PCP); UPnP: UDP 1900 multicast, then HTTP | The local router | No |
| Updates | TCP 443 | pkgs.peerlify.net, falling back to peerlify-bucket.s3.ca-central-1.amazonaws.com | For updates |
| Linux packages | TCP 443 | pkgs.peerlify.net | For installs and updates |
Direct connections send UDP datagrams of up to about 1,400 bytes. A path that drops packets that large, without fragmenting them, lets small requests through but stalls large transfers; see Small requests work, but large transfers stall.
Relay addresses can change as relays are added; allow the relay ports to any destination if you can.
The local UDP port is random unless you set TapClient:Relay:LocalUdpPort. See Client configuration.
What works under restrictive firewalls
| Allowed outbound | Result |
|---|---|
| Everything | Direct connections where the NATs allow, relays otherwise. |
| TCP 443 only | Works, through relays only. |
| HTTP proxy only | Doesn't work. Relay connections don't use HTTP proxies. |
Connections to relays are TLS, so they look like web traffic to firewalls. Firewalls that decrypt and inspect TLS may interfere; the client accepts any relay certificate, so interception doesn't expose traffic, but an inspecting proxy that blocks non-HTTP content may block relays.
DNS
The client needs DNS to find control-plane.peerlify.com. If DNS fails, it uses the fallback address. Relays are reached by IP address, so once a device has its peer list, traffic doesn't depend on DNS.
On the device
- Windows: the installer adds Windows Firewall rules allowing the service's traffic.
- macOS and Linux: the client doesn't change the firewall, except that a Linux device acting as an exit point adds a NAT (masquerade) rule. If you filter outbound traffic on the device, allow the connections above for
peerlify-daemon.
Inbound traffic arriving on the Peerlify adapter, from other devices in the network, is subject to the device's own firewall as well as to the access policy.