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

PurposeProtocol and portDestinationRequired
Control planeTCP 443 (HTTPS)control-plane.peerlify.comYes
Control plane fallbackTCP 31202143.198.32.171When the main address can't be reached
RelaysTCP 5879, then 443, then 80Peerlify's relays (addresses sent by the control plane)Yes; at least one of the three ports
Public address discovery (STUN)UDP 3478The device's home relayFor direct connections
Direct connectionsUDP, from one local port to any portOther devices' public, LAN or IPv6 addressesNo; without it, traffic uses relays
Port mappingUDP 5351 (NAT-PMP, PCP); UPnP: UDP 1900 multicast, then HTTPThe local routerNo
UpdatesTCP 443pkgs.peerlify.net, falling back to peerlify-bucket.s3.ca-central-1.amazonaws.comFor updates
Linux packagesTCP 443pkgs.peerlify.netFor 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 outboundResult
EverythingDirect connections where the NATs allow, relays otherwise.
TCP 443 onlyWorks, through relays only.
HTTP proxy onlyDoesn'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.

Next steps

Was this page helpful?