Hardening the coturn TURN server for BigBlueButton

A TURN relay gives users behind restrictive firewalls a path into BigBlueButton, and a loose one can also reach your internal networks. This page covers the settings that close that gap and how to verify them.

On this page

Why hardening the coturn TURN server for BigBlueButton matters

Hardening the coturn TURN server means configuring the relay so it carries only the BigBlueButton media it is meant to carry, for the users who need it. A team needs this as soon as the relay is live, which happens whenever participants sit behind firewalls that block direct WebRTC media. The BigBlueButton install docs expect TCP ports 80 and 443 and UDP ports 16384 to 32768 to be reachable on the server, and they recommend a TURN server for users behind restrictive firewalls. They do not give values for how that TURN server should be configured, so the settings that decide how exposed the relay is fall to the operator. Treat the relay as a service to configure deliberately and verify after every change.

A TURN server is a route into your network. Clients on the internet connect to it and ask it to relay traffic to other endpoints, so it must be able to reach the peers it serves. If its own network position also lets it reach internal hosts such as databases, admin consoles or hypervisors, anyone who can use the relay can reach those hosts through it. Scoping the relay means deciding which peer address ranges it may reach, denying the private and internal ranges your network uses, and confirming the result by testing from the relay host itself. Do not assume that the package defaults already do this. Check the effective configuration on your own host.

Start with an inventory. Write down which hosts, subnets and services the relay host can reach today, and which of those it must never reach. Then confirm each item in your own coturn configuration file, including the static auth secret the relay checks, the peer address restrictions and the TLS listener. Test whether a relay allocation can open a connection to one of the internal hosts on your list, and record the result. The sections that follow cover these settings one at a time. Repeat the same review for every relay in a cluster and after each network change, because a relay configured once and never revisited can drift away from the network it sits in.

How the TURN relay sits between users and your internal networks

This illustrative architecture follows a meeting from the user's browser. The browser reaches the BigBlueButton server over TCP 80 and 443 for the web application and UDP through the media range for media. When direct media is blocked, the client uses the coturn relay, and the browser connects to that relay with TLS on 443. The relay host sits inside the trust boundary, and its denied peer IP ranges stop relayed traffic from reaching databases, admin hosts and cloud metadata addresses. Check that the denied ranges cover every internal network you run, and confirm which listener carries TLS in your own configuration.

Illustrative architecture showing the relay trust boundary and denied internal paths.

Which coturn hardening control fits which deployment

This table compares the four coturn hardening controls, plus patching, against the deployments that usually need them. Read each row for what the control protects, what users or operators notice, and when it is worth the effort. The main takeaway: patching and log handling apply to every deployment, while the secret, peer range and TLS choices depend on how exposed the relay is and who uses it.

ControlWhat it protects and changesWhen it fits
Static auth secretProtects the relay from unauthenticated use. Users get credentials from the server, while operators must keep the secret in sync across servers.Every TURN deployment. Confirm the secret mechanism and key names for your coturn version before you change them.
Denied peer IP rangesStops the relay reaching internal networks and metadata addresses. Users see no change if media paths stay open, so test calls after each edit.Relays in cloud or shared networks, or where the TURN host can reach databases and admin panels. Confirm the ranges your own network uses.
TLS on 443Carries TURN over TLS on port 443, so clients behind restrictive firewalls can still reach the relay. Operators manage certificates for the relay hostname.Clients on restrictive networks. Confirm how port 443 is shared with the BigBlueButton web server first.
Log handling for IP addressesLimits how long client IP addresses stay in logs, since they can identify individuals. Operators decide what is logged and who reads it.Any deployment with a privacy or data protection obligation, including education and public sector. Confirm retention rules with your legal or privacy team.
Keeping coturn patchedCloses known vulnerabilities in the relay software that is exposed to the internet. Operators schedule restarts, and users may see brief call reconnects.Every deployment. Plan it with the BigBlueButton server routine and confirm the coturn package source for your distribution.

How to harden coturn in the order that avoids outages

The sequence moves from confirming that a TURN relay is needed to locking down its secret, peer reachability, encryption, logs and software version. Each step ends with a check you can run before moving on, so a change that breaks media shows up while it is still small. Roll back any step whose check fails before starting the next one.

  1. Confirm the TURN need and network path

    Before changing anything, list which users cannot reach the server over UDP 16384 to 32768 and TCP 443, using the port requirements in the BigBlueButton install docs. Record each network, firewall or proxy that sits between those users and the server, including any device that rewrites traffic. Then join a test meeting from a client behind a restrictive network and note whether media flows directly or through the relay. This step is done when you have a written path diagram and one relayed test session that you can repeat after each later step.

  2. Set the static auth secret and wire it up

    Configure coturn to use a static auth secret so that only credentials generated from that secret are accepted. Set the matching value on the BigBlueButton side so the TURN settings handed to clients agree with coturn. Handle the secret as the BigBlueButton API secret guidance describes: generate it randomly, keep it out of browser code and tickets, and store it in a protected config file. Restart coturn, then confirm BigBlueButton picks up the new value. The check is a client that joins through the relay successfully, and a test request with a wrong secret that the coturn log records as refused.

  3. Define denied peer ranges from your inventory

    Build an inventory of every internal network the relay host can reach, including the BigBlueButton private segment, database and storage subnets, management networks, VPN ranges and any cloud metadata address. Add each range as a denied peer address in the coturn configuration so relayed traffic cannot open sessions to those hosts. Keep the inventory in version control so reviewers can compare it with the configuration. The check is that a test client allowed to use the relay gets refused when it targets a test address inside each denied range, while a public test address still relays media.

  4. Configure TLS on port 443

    Point coturn's TLS listener at port 443 with a certificate that matches the hostname BigBlueButton uses, since the install docs require a valid hostname for SSL. Confirm that nothing else on the host already holds port 443 on that address, because a port conflict is a common reason the service fails to start after a change. Keep the private key readable only by the coturn service account. The check is that a client on a restrictive test network connects over TLS on 443, the certificate chain validates from the client side, and the UDP listener still serves normal clients.

  5. Set log retention and IP address handling

    Decide how long coturn keeps logs that contain client and peer IP addresses, where those logs are written and who can read them. Set the log file location, permissions and rotation in coturn so the decision is enforced rather than assumed. Confirm the retention period with your privacy owner before relying on any default, and align it with the privacy notice and records rules that already cover meeting data. The check is one test session that produces the expected log entries, and a file listing that shows the permissions and rotation match what you wrote down.

  6. Patch coturn and restart in a window

    Update coturn to the current packaged release from your distribution's repository, and review the release notes for changes to any option you set in the earlier steps. Confirm that the packaged version is one your BigBlueButton release supports, using the BigBlueButton supported versions guidance. Keep a copy of the previous configuration so you can restore it quickly. After the restart, rerun the test from the first step, the denied range test and the TLS test. The step is done when all three checks pass and one relayed session still carries media.

Denying peer IP ranges so the relay cannot reach internal networks

The relay must refuse to forward traffic to internal address space. A TURN server carries packets to whichever peer address a client asks for, so without a denied list, a client that can reach the relay could aim traffic at hosts on your private networks, at the metadata service your cloud provider exposes to instances, or at management interfaces that were never meant to face users. Build the list from a written inventory: every private network the relay host can route to, every cloud metadata endpoint your provider documents for the instance, and every hypervisor, bastion, monitoring or backup host the relay can reach. Enter those ranges as denied-peer-ip entries in the coturn configuration, and confirm the exact syntax for your coturn version in its documentation.

The denied list must not block the path that makes the relay useful. Relayed media is delivered to the BigBlueButton server on the UDP range from 16384 to 32768, so the server's own address cannot fall inside a denied block. If the BigBlueButton host sits in a private subnet, add an explicit allowed-peer-ip entry for it and confirm how your coturn version evaluates allowed and denied entries together. Expect the main trade-off here. A tight list can block legitimate paths, such as a Scalelite pool or a recording store on a private network. A loose list leaves databases, admin panels and internal APIs open to anyone who can create a TURN allocation. Record each exception with its reason, and keep each one as narrow as the path allows.

Test the list from the relay host itself, because that is the vantage point anyone abusing the relay will have. From the relay, attempt connections to a sample address in each denied range, to the metadata endpoint and to each management host, and confirm they fail. Then run a TURN client test that requests an allocation toward those addresses and confirm the server refuses it. Confirm that a test call still works through the BigBlueButton media range. Repeat the whole check after any network change, including new subnets, peering, VPN routes, a moved BigBlueButton or Scalelite host, new management tooling or a changed cloud network. Keep the inventory and the test results with the change record so the next reviewer can see which exceptions exist and why.

Security risks a hardened TURN relay should close

A TURN relay sits on the public internet and forwards media for your meetings, so every weakness in it can be reached from outside your network. The five risks below share one root cause: the relay trusts more than it should, whether that is an unknown client, a shared secret, a route into internal hosts, stored IP addresses or outdated software.

Open relay abused by third parties

A TURN server that accepts allocations from anyone can be used to relay traffic for people outside your organization, which puts your IP address and bandwidth at risk. The control is to accept relay requests only with credentials issued by your BigBlueButton setup, using the static auth secret mechanism in coturn. Check that an anonymous allocation is refused by running a test client from outside your network without credentials and confirming the server rejects it. Confirm the exact option names with the coturn project documentation before you change the configuration.

Shared secret leaked or never rotated

The static auth secret is the only thing separating your relay from anonymous use, so a copy that leaks through a backup, a shared config file or a former administrator's laptop stays valid until someone changes it. Keep the secret long and random, store it in the coturn configuration readable only by root and the service account, and keep it out of any browser-side code. Rotate it on a set schedule and after staff changes, then confirm that credentials built from the old secret are refused. Update every system that uses the TURN secret at the same time.

Relay access into internal networks

A relay that can open connections to any address can also reach databases, admin consoles and cloud metadata endpoints that sit behind your firewall, because the relay runs inside or next to your network. The control is to list denied peer ranges covering private address space, loopback, link-local addresses and the networks where your internal services live, using denied-peer-ip. Test it from an allocation: request a relay to an internal host and confirm the connection is blocked. Re-run the test after every network change, since new subnets are easy to forget.

Log IP addresses without retention

Relay and server logs record the public addresses of participants, and those addresses are personal data for many organizations. Without a written retention rule, they accumulate in log files and backups for as long as the disk allows. Decide what the relay logs, set how long those logs are kept, and make sure log rotation actually deletes old files on the host. Check by listing log files and their ages, and confirm the retention period with your privacy or legal team before you set it.

Unpatched coturn build

A relay exposed to the internet inherits every vulnerability in its own software, and a package installed once and forgotten will not receive fixes on its own. Install coturn from a source your team tracks, record the version in your server inventory, and add it to the same patch routine as the rest of the BigBlueButton host. Compare the installed version with the latest coturn release and confirm which fixes it includes before you accept it as current. Watch the project's release announcements so you hear about security fixes when they ship.

Choosing TLS and port settings by network environment

Users on open networks usually reach BigBlueButton without the relay. Most media travels over UDP in the range 16384 to 32768, and the TURN server is a fallback for the smaller group whose networks block that range. Your main TLS task is a valid public hostname with a certificate that browsers trust, because the install docs require a valid hostname for SSL. TCP 443 also serves the web application, so TLS on that port is already part of normal operation.

  • Media path: Confirm that UDP 16384 to 32768 is open inbound, since that is the route most sessions take.
  • Public hostname: Issue the certificate for the exact name users type, and use that same name in the front end and the server configuration.
  • Chain and renewal: Check that the full certificate chain is served and that one named owner handles renewal and the service reload that follows it.
  • Relay fallback: Keep TURN enabled so the few users on blocked networks can still join.

Confirm with a join from an outside network such as a home connection, because internal routes often hide problems that external users will hit.

Limits to confirm before you change production

Each card names one item that only your environment can answer. The hardening steps for this relay depend on a specific coturn release, your BigBlueButton 4.0 TURN configuration, your network layout, your log policy and whether the host serves other workloads. Confirm all five and keep the answers with your change record before you edit a live relay.

coturn version and keys

Hardening settings depend on the coturn release installed on your host, and some keys behave differently between releases. Check the installed version with the package manager on your Ubuntu 24.04 server, then read the turnserver man page or configuration reference for that exact version before you edit the file. Remove any key your version does not support, and test the TURN listener after each change so a typo does not silently disable authentication.

BigBlueButton 4.0 and TURN settings

Confirm the server is a clean BigBlueButton 4.0 installation, because direct upgrades from 2.6, 2.7 or 3.0 are not supported. Then record which TURN server and credentials the install wrote into the BigBlueButton configuration, since clients may be pointed at the relay you are about to harden. Compare that output with the install documentation for your release and note every TURN address your clients receive.

Install docs

Internal ranges and metadata addresses

The deny rules must match your network, not a generic list. Collect every private range your hosts, VPCs, VLANs and VPN users occupy, plus the instance metadata endpoint your cloud provider documents for its platform, and any internal DNS resolvers the relay could reach. Confirm the list with your network team and cloud documentation, then test from the relay that each address is refused. One missing range leaves an internal path open to peer traffic.

Log retention for IP addresses

TURN logs can record client and peer IP addresses, which many organizations treat as personal data. Ask your privacy or compliance owner how long these logs may be kept under your retention policy, then check where the host sends them: local files, journald or a central collector. Confirm that log rotation deletes them on schedule and that the verbosity level you choose does not store more addresses than the policy allows.

Whether the relay is shared

A TURN relay that also serves other workloads changes what a deny rule can break and who can use the shared secret. Confirm whether this host also runs Greenlight, a Scalelite node or any other application that depends on TURN, and list the clients that use it. Check whether those services need peer addresses inside ranges you plan to block, and whether another application holds the same static credential. Agree the change window with each owner before editing the live relay.

Questions teams ask before hardening coturn

How long does hardening a coturn TURN server take?

The length depends on how many TURN servers you run, how complex your network is and how well your address plan is documented. A single TURN host on a flat network with known addresses is a small job. Several servers across separate zones, multiple data centers or extra NAT layers add time for each subnet the deny list must cover and for every test call across those paths. Ask any provider for a fixed-scope plan that lists the servers, network segments, test paths and retest step before you agree a timeline. Ask also which work is one-time (initial configuration, policy design, testing) and which recurs (patch cycles, log reviews, periodic retests). A quote should show each of those separately.

Can our own team harden coturn for BigBlueButton without a partner?

Yes, a platform team with Linux, firewall and BigBlueButton experience can do it alone, provided it has time to test calls from every network the server serves. The work covers the static auth secret, denied peer ranges, TLS on 443, log settings and an update routine. Most teams find the test matrix the hardest part. A relay that is locked down too far can still let some calls connect on a direct path, so verification must confirm relayed sessions specifically. If your team lacks that depth or capacity, a fixed-scope engagement can cover configuration and testing while your staff run the platform. DeployOpen implements and hardens self-hosted platforms in your own infrastructure, and ongoing support is available as a retainer.

What do we need to provide before coturn hardening starts?

Before work starts, the team needs an accurate picture of the network and named people who can approve changes. The usual inputs are:

  • A network inventory listing each TURN host, its public and private addresses and the subnets it can reach.
  • A valid hostname and certificates for the TLS endpoint on 443, along with the renewal process.
  • A log policy stating whether IP addresses are stored, where logs go, who reads them and how long they are kept.
  • Change windows for firewall edits and service restarts, plus a rollback plan.
  • A staging BigBlueButton server where test calls can run.

Confirm each item with your security and operations owners before the plan is written, because logging and retention decisions shape the configuration.

What breaks if the coturn denied peer list is too strict?

Users behind restrictive firewalls may fail to connect or see one-way audio, and calls may work on one network but not another. The deny list is meant to stop the relay from reaching internal networks, so an overly broad rule can also block addresses that your BigBlueButton servers or media paths still need. Build the list from the network inventory, not from guesses, and mark every address the relay must still reach. Then test from each user network you support, including networks behind strict firewalls, and keep a tested rollback for the last configuration. (Illustrative example: a range that covers a private media subnet may block a path that a single call needs.) Confirm this list with the network owners before any change goes live.

How often does coturn need patching, and who owns it?

The platform team should own coturn patching, and the update cadence should follow the release notes from the coturn project and your own vulnerability management policy. Confirm the schedule with your security team rather than relying on a default. Assign a named owner for the package, a recurring check for new releases, a test call after every update and a record of the version running on each TURN host. Because coturn runs as its own service alongside BigBlueButton, updates to one do not automatically cover the other, so check the BigBlueButton release notes when you plan a joint change. If you want an outside team to carry this work, ongoing support, upgrades and continuous testing are available as retainers.

Should coturn logs keep IP addresses, and for how long?

Decide whether coturn stores client IP addresses, and for how long, before you enable detailed logging. IP addresses are personal data in many jurisdictions, and they also help investigate abuse of the relay, so the choice is a trade-off that you should document. Options to discuss include a short retention period, restricted read access to log files, forwarding to a central store with access control, and reducing peer-level detail where your policy allows. Ask your privacy and compliance leads to approve the decision, then record it in your control documentation so assessors can trace it. DeployOpen prepares systems, controls and evidence for compliance assessments, but independent auditors and certification bodies issue the findings.

How do coturn changes relate to the BigBlueButton secret and firewall work?

Coturn hardening is one layer alongside two other tasks, and their changes can interfere with each other. The BigBlueButton API secret signs API calls, while coturn uses its own static auth secret for TURN credentials, so confirm which secret each setting uses before you rotate either one. The firewall work must keep TCP 80 and 443 open and allow the UDP media range from 16384 to 32768, and it must also allow the TURN ports your coturn configuration listens on. Plan the three tasks in one change window, in this order: rotate the BigBlueButton secret, lock down the firewall, then apply the coturn secret, deny list and TLS settings. Test after each step, because a mismatched secret or blocked port often looks like a general join failure.

How DeployOpen scopes and delivers coturn hardening

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside the client's own infrastructure, so the TURN relay is scoped against your networks and cloud accounts. Hardening the coturn TURN server for BigBlueButton follows a written scope, a tested build and a handover record your operators can keep. Engagements are fixed-scope, and ongoing support is available as a retainer.

How we scope

  • The written scope lists each TURN host, the BigBlueButton servers it serves and how users reach it.
  • It names the internal address ranges the relay must refuse to reach, based on the networks you run.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before any change is made to the TURN server.

How we build

  • Configure the static auth secret so only your BigBlueButton servers can issue TURN credentials.
  • Apply denied peer IP rules, then test that the relay cannot open connections to your internal address ranges.
  • Serve TLS on port 443, then confirm users behind restrictive firewalls still join meetings through the relay.

How we hand over

  • A written configuration record covering the secret handling, denied ranges, TLS certificate, log settings and coturn version.
  • Test evidence showing blocked internal peer addresses and a successful join through the relay from a restricted network.
  • Operator notes on IP address log retention, secret rotation steps and the routine for applying coturn security updates.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers for the TURN server.
  • Retesting after BigBlueButton upgrades, certificate renewals or changes to the internal network layout.
  • Ask in the quote which party handles certificate renewal, secret rotation and coturn patching after handover.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.