Skip to main content

Network requirements

This page is generated by scripts/gen-network-requirements.sh from mpbx ports --markdown. Do not edit it by hand; change the table in pbx/bin/mpbx/src/ports_cli.rs and run the script again.

Print the same table on an installed host with mpbx ports (text) or mpbx ports --markdown. mpbx ports --config /etc/mpbx/mpbx.toml (or with MPBX_CONFIG set) first lists the listeners your configuration really opens, from [http], [tls], [sip], [metrics] and [ice], then the table. The command opens no socket and changes nothing. To check that the listeners are up on the host, run mpbx doctor.

Rules that apply to every install​

  • Publish only the inbound rows you need. Databases, the cache, ClickHouse and the metrics port stay on the private network.
  • Phones, browsers and trunks need UDP, TCP or TLS to the SIP ports they use. A firewall that drops the SIP ports makes phones unable to register.
  • Media uses one UDP range in both directions. Keep the range open to the phones and trunks that send media, and NAT-map it when the PBX sits behind a router.
  • Public HTTPS is required for the messaging channels (WhatsApp, Messenger, Telegram), the live chat widget and the browser softphone. Meta, Telegram and the widget must reach the address on port 443 with a certificate from a public certificate authority.
  • Air-gapped installs keep only the inbound rows of their own users and the internal rows. Outbound rows that need the internet do not work there; see the air-gapped page.

Ports by direction​

DirectionProtocolPortFeatureWho connectsSet by
inboundhttps443 (the address in [http] listen)Web client, REST API, sign-in, provisioning URLsBrowsers, softphones, desk phones (provisioning), admins[http] listen, [setup] fqdn
inboundtcp80Plain HTTP redirect and ACME HTTP-01 challengePublic internet (certificate authority)automatic certificates ([tls] ACME settings)
inboundudp5060 (example; set by listen_udp)SIP signalling over UDPDesk phones, softphones on the LAN, SIP trunks[sip] listen_udp
inboundtcp5060 (example; set by listen_tcp)SIP signalling over TCPDesk phones, SIP trunks[sip] listen_tcp
inboundtls5061 (set by listen_tls)SIP over TLS (sips:)Desk phones, softphones, SIP trunks that require TLS[sip] listen_tls
inboundhttps443 through the reverse proxy, path /sip (set by listen_ws, listen_wss)SIP over WebSocket and secure WebSocket (browser softphone)Browser softphones[sip] listen_ws, listen_wss, trusted_proxies
inboundudp10000-59999 (the rtpengine range; both directions use it)Media (RTP and SRTP, audio and video)Phones, softphones, browsers, trunksrtpengine RTPE_PORT_MIN / RTPE_PORT_MAX
inboundtcp+udp3478 (STUN and TURN); 5349 for TURN over TLSMedia relay for NAT traversal (STUN and TURN)Browsers and softphones behind NAT[ice] stun_urls, [ice] turn_urls
inboundudp5060 to 224.0.1.75 (LAN only; not routed)Plug-and-play phone discovery (multicast)Desk phones on the same LAN segment[provisioning] pnp_listener
internaltcp9464Prometheus metrics, /healthz and /readyzThe monitoring host only; never published[metrics] listen
internaltcp5432Database (PostgreSQL)The PBX services onlydatabase connection string
internaltcp6379Cache and bus (Valkey)The PBX services onlycache connection string
internaltcp8123Call history and analytics (ClickHouse HTTP)The PBX services onlyClickHouse URL
outboundhttps443Push notifications through the MonoPbx relayThe relay host (public address of the relay)relay settings ([push]); not needed for air-gapped installs
outboundhttps443Certificate authority (ACME)The certificate authorityautomatic certificates only
outboundtcp+udp5060 (UDP, TCP) or 5061 (TLS), as the trunk saysSIP trunks and providersThe SIP providertrunk settings
outboundudp10000-59999 (source range)Media to trunks and remote endpointsThe SIP provider and remote endpointsrtpengine range
outboundhttps443SMS over HTTPS providers and AI providers (bring your own key)The provider's public HTTPS addressper provider settings
outboundhttps443 (graph.facebook.com, api.telegram.org)Messaging channels (Meta WhatsApp and Messenger, Telegram)The channel provider; the provider calls back on the inbound HTTPS addresschannel settings (omnichannel)
outboundtcp2775 (default; set by the SMSC)SMS over SMPPThe SMS centreSMPP provider host, port
outboundtcp587 (STARTTLS) or 465 (TLS)Email (voicemail, notifications, reports)The mail server[email] SMTP settings or provider
outboundtcp+udp53DNS lookups for SIP and certificatesThe DNS resolverhost resolver
outboundudp123Time synchronisation (recommended)An NTP server; a local one is fine on an air-gapped sitehost NTP service

Each row names the configuration key that moves it. A feature that is switched off opens none of its rows.