Skip to content

fix: announce LiveKit's external IP behind NAT - #866

Merged
antobinary merged 1 commit into
bigbluebutton:v4.0.x-releasefrom
prlanzarin:binst40/chore/lk-nip-adv
Oct 28, 2026
Merged

antobinary merged 1 commit into
bigbluebutton:v4.0.x-releasefrom
prlanzarin:binst40/chore/lk-nip-adv

Conversation

@prlanzarin

Copy link
Copy Markdown
Member

What does this PR do?

Behind NAT, bbb-install now sets rtc.node_ip to the external IP in /etc/bigbluebutton/livekit.yaml, as it already does for FreeSWITCH and mediasoup. LiveKit then announces the external address without asking public STUN servers (Google, Twilio) on every connection.

It also sets rtc.advertise_internal_ip: true. With node_ip alone, LiveKit stops announcing the private address, which users on the private network and on-host components use today.

The step needs livekit-server 1.13.6 or later, which the v4.0.x-develop packages ship (1.13.7). livekit-server 1.9 (BigBlueButton 4.0.0) refuses to start with advertise_internal_ip, and 1.13.0-1.13.5 ignore it when node_ip is set. On older versions bbb-install sets neither key, and re-running it after the LiveKit upgrade sets them.

How to test

On a host behind 1:1 NAT (a public IP mapped to a private address on the NIC, as on EC2):

  1. Run bbb-install from this branch on a server with livekit-server 1.13.6 or later. /etc/bigbluebutton/livekit.yaml has rtc.node_ip: <external IP> and rtc.advertise_internal_ip: true, and journalctl -u livekit-server shows using explicit node IP for NAT1To1Ips with "advertiseInternalIP": true.
  2. Join a meeting from outside and from the server's private network. Audio, webcams and screen sharing work in both cases.
  3. On a server with livekit-server 1.9.12 (BigBlueButton 4.0.0), bbb-install prints livekit-server 1.9.12: not configuring LiveKit for NAT (advertise_internal_ip needs 1.13.6 or later), livekit.yaml gets no new keys, and livekit-server starts.
  4. On a host without NAT, livekit.yaml does not change.

Changelog

Technical — Behind NAT, bbb-install sets LiveKit's rtc.node_ip and rtc.advertise_internal_ip with livekit-server 1.13.6 or later.
User-facing — None.

Behind NAT, bbb-install sets the external IP for FreeSWITCH and
mediasoup, but not for LiveKit. LiveKit then learns its external
address from public STUN servers (Google, Twilio) on every connection,
and announces no public address when outbound STUN is blocked.

Set rtc.node_ip to the external IP, as the 4.0 firewall docs ask, so no
STUN lookup is needed. LiveKit keeps that IP until bbb-install runs
again behind NAT. Also set
rtc.advertise_internal_ip: node_ip alone would stop LiveKit announcing
the private address, which users on the private network and on-host
components use today.

This needs livekit-server 1.13.6. 1.13.0-1.13.5 ignore
advertise_internal_ip when node_ip is set, and 1.9 (BigBlueButton
4.0.0) refuses to start with it. On older versions bbb-install sets
neither key; re-running it after the LiveKit upgrade sets them.
@prlanzarin
prlanzarin force-pushed the binst40/chore/lk-nip-adv branch from afff43f to d8a3340 Compare October 28, 2026 21:11
@antobinary
antobinary merged commit 2ce44df into bigbluebutton:v4.0.x-release Oct 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants