Networking

Peers connect to each other directly whenever they can. When a firewall or NAT blocks the direct path, they use a STUN server to learn their public address and a TURN server to relay their traffic. Netzilo provides these relays by default.

The Networking tab lets you replace the built-in relays with a managed service, Twilio or Cloudflare, or with TURN/STUN Servers you run yourself. You find it under Integrations > Networking.

The Networking tab under Integrations, with the Twilio, Cloudflare and TURN/STUN Servers cards, each with a switch and a Connect button

How it works

  • The three options exclude each other. While one is connected, the other two cards are greyed out.
  • The connected option replaces the built-in relays for every peer in the account. Peers that could connect directly keep doing so; only relayed connections change.
  • Turning the option off returns all peers to the built-in relays.

Leave this tab alone unless you have a reason: for example, relays closer to your users, or a policy that relay traffic stays on servers you operate.

Connect Twilio

  1. Go to Integrations > Networking and click Connect Twilio.
  2. Open the Twilio console and copy your Account SID and Auth Token.
  3. Enter both and click Connect.
FieldWhat to enter
Account SIDYour Twilio Account SID, starting with AC.
Auth TokenThe Auth Token of that account.

Netzilo checks the credentials with Twilio before it saves them.

Connect Cloudflare

  1. Go to Integrations > Networking and click Connect Cloudflare.
  2. Open the Cloudflare dashboard with Cloudflare Dashboard in the dialog, and copy the Token ID and the API Token of your TURN service.
  3. Enter both and click Connect.
FieldWhat to enter
Token IDThe token ID from Cloudflare.
API TokenThe API token that belongs to it.

Use your own TURN and STUN servers

  1. Go to Integrations > Networking and click Connect TURN/STUN Servers.
  2. Under STUN Servers, enter a Server URI and choose the Protocol. Use Add STUN Server for more.
  3. Under TURN Servers, enter a Server URI, the Protocol, a Username and a Password. Use Add TURN Server for more.
  4. Click Test Connection and wait for the result.
  5. Click Save Configuration.

The dialog Configure TURN/STUN Servers scrolled to the TURN Servers section, with turn.example.com:3478, protocol TCP, a username and a password entered, and the buttons Test Connection and Save Configuration

FieldWhat to enter
STUN Server URIhostname:port, such as stun.example.com:3478.
STUN ProtocolUDP or TCP.
TURN Server URIhostname:port, such as turn.example.com:3478.
TURN ProtocolUDP, TCP, DTLS or HTTPS. DTLS and HTTPS use TLS to the server.
Username, PasswordThe TURN credentials. Both are required for every TURN server.

You need at least one STUN server and one TURN server.

Test Connection runs a connectivity test from your browser against the servers you entered. It does not save anything.

ResultMeaning
Connection test successful! Found: … candidates.The servers answered. The message counts the STUN, authenticated TURN and host candidates found.
TURN authentication failed - no relay candidates found…The STUN part works, but the TURN server refused the credentials or is not reachable.
Connection test timeout - servers may be behind firewall or unreachableNo answer in time. Check the address, the port and the firewall.
No ICE candidates found - all servers may be unreachableNone of the servers answered.

The test runs from your browser, so it proves that the servers are reachable from your network. Peers elsewhere may still be blocked by their own firewall.

Disable an integration

Turn off the switch on the connected card. The dialog Disable this integration? warns that All settings of this integration will be lost. Click Disable. All peers go back to the built-in relays. To use the integration again, connect it again with its credentials.

Manage relays through the API

The same settings are available through the public API at /api/integrations, with the platform twilio, cloudflare or static for your own TURN/STUN servers. Stored credentials are masked when you read them back.

Troubleshooting

Peers that used to connect show Disconnected after you connected an integration. The integration now provides every peer's relays. Check its credentials, and for your own servers run Test Connection again. Turn the integration off to return to the built-in relays while you fix it.

Test Connection reports a timeout. The servers are not reachable from your browser. Check the address and port, and open the TURN ports in the firewall: usually 3478 and 5349, plus the relay port range your TURN server uses.

Saving fails with "Invalid TURN server format". Enter hostname:port without a scheme, such as turn.example.com:3478.

The cards show Upgrade Plan. The account is on the Free plan. See Plans & Billing.