3CX NAT Configuration: Firewall & SBC Recommendations | NetViaVoice
πŸ”§ Technical Configuration Guide Β· 2026

3CX NAT Configuration:
Firewall & SBC Recommendations

Stop one-way audio, fix registration failures, and lock down your 3CX deployment with the definitive NAT, firewall, and SBC setup guide.

By NetViaVoice Technical Team  Β·  Updated 2026  Β·  ⏱ 10 min read

πŸ“‹ Article Summary

NAT (Network Address Translation) is the single most common cause of VoIP problems in 3CX deployments β€” from one-way audio and dropped calls to SIP registration failures. This guide covers every layer of the 3CX NAT configuration stack: understanding why NAT breaks VoIP, correctly configuring 3CX's built-in NAT settings, setting the right firewall rules and port forwarding, disabling SIP ALG on your router, choosing and configuring the right Session Border Controller (SBC), and verifying your setup works end-to-end. Whether you're running 3CX on-premises or in the cloud, these expert recommendations from NetViaVoice will ensure rock-solid voice quality and registration stability.

πŸ” Why NAT Causes Problems in 3CX (and VoIP Generally)

Network Address Translation (NAT) was designed to allow multiple devices on a private network to share a single public IP address. It works brilliantly for web browsing and email. But it creates serious problems for SIP-based VoIP systems like 3CX β€” and understanding why is the foundation of fixing it.

The core issue: SIP embeds IP address and port information inside the message body (in the SDP β€” Session Description Protocol), not just in the packet headers. When a SIP INVITE message leaves your 3CX server on a private IP (e.g., 192.168.1.10), it contains that private address in the SDP payload. Your NAT router rewrites the packet header but has no idea that the same IP is also embedded in the message body. The receiving SIP proxy or trunk provider sees a mismatched address and either fails to establish the call, or β€” more frustratingly β€” audio flows only one way.

The result is the classic set of VoIP symptoms that plague untuned 3CX deployments: one-way audio (you can hear them, they can't hear you β€” or vice versa), calls that ring but never connect, calls that work internally but fail for external numbers, and intermittent registration dropping. Every one of these can be traced back to NAT handling.

73%of 3CX support tickets relate to NAT configuration issues
5060SIP signaling port β€” must be open and unmodified
50903CX SBC tunnel port β€” critical for remote phones
32768–65535 UDP ports for RTP media streams
The NAT Problem β€” Why SIP Breaks at the Network Edge
πŸ“±IP Phone
192.168.1.50
β†’
πŸ–₯️3CX Server
192.168.1.10
β†’
πŸ”₯NAT Router
⚠️ SDP not rewritten
β†’
🌐SIP Trunk / ITSP
Sees private IP!
β†’
πŸ”‡One-way audio
or no audio

Need Help Configuring 3CX NAT & Firewall?

NetViaVoice engineers have configured 3CX deployments for hundreds of businesses. Get expert help today.

βš™οΈ 3CX Built-In NAT Settings β€” Where to Configure

3CX has a dedicated NAT configuration section that β€” when set correctly β€” tells the system how to handle the discrepancy between its private LAN IP and its public internet IP. This is your first line of defense.

Accessing 3CX NAT Settings

In the 3CX Management Console, navigate to: Admin β†’ Settings β†’ Network β†’ NAT. This section controls how 3CX advertises its IP address in SIP and SDP messages.

3CX NAT SettingWhat It DoesRecommended Value
Public IPThe WAN (internet-facing) IP 3CX advertises in SDPYour static public IP or DDNS hostname
Local IPThe LAN IP of your 3CX serverServer's static private IP (e.g., 192.168.1.10)
STUN ServerUsed to auto-detect public IP if dynamicstun.3cx.com or stun.l.google.com:19302
NAT ModeDetermines how 3CX resolves the public/private IP mismatchAuto or Static (prefer Static with fixed public IP)
Local SubnetsRanges where 3CX uses private IPs in SDP (internal calls)All your internal LAN subnets (e.g., 192.168.1.0/24)
External hostnameFQDN used for SIP and WebRTC clientsYour 3CX FQDN (e.g., pbx.yourdomain.com)
// 3CX Config Reference β€” NAT Key Values
Public IP:      203.0.113.45       ← your static WAN IP
Local IP:       192.168.1.10       ← 3CX server's LAN IP
STUN Server:    stun.3cx.com       ← fallback for dynamic IPs
Local Subnets:  192.168.1.0/24     ← add ALL internal subnets
External FQDN:  pbx.yourdomain.com ← must resolve to Public IP
    
⚠️
Common Mistake: Missing Subnets If you have multiple VLANs or subnets in your office (e.g., a guest WiFi at 10.0.0.0/24 and a staff network at 192.168.1.0/24), you must add ALL of them to the Local Subnets field. Missing a subnet means phones on that network get the public IP in their SDP β€” causing one-way audio on internal calls.

πŸ”’ Required Ports for 3CX β€” Full Port Reference Table

3CX uses a specific set of ports that must be open both inbound and outbound through your firewall. Missing even one can cause specific, hard-to-diagnose call failures. Here is the complete 2026 port reference:

πŸ”΄ SIP Signaling

5060 UDP/TCP Standard SIP trunk signaling. Must be open inbound from your SIP provider's IP range.

πŸ”΄ SIP TLS (Secure)

5061 TCP Encrypted SIP signaling. Required if using TLS transport with your SIP trunk or clients.

πŸ”΄ RTP Media

9000–10999 UDP Voice media (RTP) streams. 3CX default range β€” must be open bidirectionally.

πŸ”΄ 3CX Tunnel / SBC

5090 UDP/TCP 3CX proprietary tunnel for remote phones and SBC connection. Critical for remote workers.

🟒 STUN

3478 UDP STUN server communication for public IP detection. Required if using STUN for NAT traversal.

🟒 TURN

3478/5349 TURN relay for WebRTC clients behind strict firewalls. Needed for web browser calling.
PortProtocolDirectionPurposePriority
5060UDP / TCPInbound + OutboundSIP signaling with trunk & clientsCritical
5061TCPInbound + OutboundSIP TLS (encrypted signaling)Critical
9000–10999UDPInbound + OutboundRTP voice mediaCritical
5090UDP + TCPInbound3CX SBC tunnel / remote phonesCritical
443TCPInbound3CX Web Client & Management ConsoleHigh
5001TCPInboundAlternate HTTPS for 3CX Web ClientHigh
3478UDPOutboundSTUN server communicationMedium
80TCPInboundHTTP redirect to HTTPSMedium

πŸ”₯ Firewall Rules & Port Forwarding for 3CX

Proper firewall configuration for 3CX involves two separate concerns: port forwarding (directing inbound traffic from your router to the 3CX server) and firewall rules (determining what traffic is allowed in and out, and from which source IPs).

Port Forwarding Rules (Router / NAT Gateway)

Port Forwarding Rules β€” Router Configuration
# Forward these ports to your 3CX server's LAN IP (e.g., 192.168.1.10)

External Port   Protocol   Internal Port   Destination
5060            UDP+TCP    5060            192.168.1.10
5061            TCP        5061            192.168.1.10
5090            UDP+TCP    5090            192.168.1.10
9000-10999      UDP        9000-10999      192.168.1.10
443             TCP        443             192.168.1.10
5001            TCP        5001            192.168.1.10
    

Inbound Firewall Rules β€” Best Practices

πŸ›‘οΈ Recommended Inbound Firewall Strategy

  • SIP port 5060/5061: Restrict to your SIP trunk provider's IP range only. Exposing 5060 to the entire internet invites SIP scanning and toll fraud within hours.
  • RTP ports 9000–10999: Allow from any IP β€” RTP must flow from wherever your SIP trunk provider's media servers are located, which can span many IPs.
  • Port 5090 (SBC Tunnel): Allow from any IP β€” remote employee phones can connect from any internet connection.
  • Port 443/5001: Allow from any IP for web client access. Apply rate limiting if possible.
  • Management Console: Restrict access to your office IP ranges only. Never expose admin interfaces to the public internet.
  • Geo-blocking: Consider blocking inbound SIP traffic from countries you never do business with β€” a significant reduction in malicious probe traffic.

🚫 SIP ALG β€” Why You Must Disable It & How

SIP ALG (Application Layer Gateway) is a feature built into many consumer and small-business routers that attempts to help SIP traverse NAT by rewriting IP addresses in SIP packets. The intention is good. The execution is almost universally broken. SIP ALG is one of the most consistent causes of 3CX call failures, one-way audio, and registration problems in real-world deployments.

🚫
Disable SIP ALG on Every Router Between 3CX and the Internet 3CX is designed to handle NAT traversal itself β€” via STUN, SBC, or NAT settings. SIP ALG interferes with this process, causing garbled SDP bodies, incorrect IP addresses in SIP headers, and unpredictable call behavior. It must be disabled on all routers and firewalls in the path.
Router / Firewall BrandWhere to Disable SIP ALGSetting Name
Cisco IOS RouterGlobal config modeno ip nat service sip udp port 5060
Ubiquiti EdgeRouterConfig β†’ Firewall/NAT β†’ ALGDisable SIP under ALG settings
pfSense / OPNsenseSystem β†’ Advanced β†’ FirewallUncheck "Enable SIP Proxy"
Fortinet FortiGateSystem β†’ Feature VisibilityDisable SIP ALG in VoIP profile
Netgear (consumer)Advanced β†’ WAN SetupUncheck "Disable SIP ALG"
TP-Link (consumer)Advanced β†’ NAT Forwarding β†’ ALGDisable SIP under ALG
SonicWallNetwork β†’ VoIP β†’ SettingsDisable "SIP Transformations"
MikrotikIP β†’ Firewall β†’ Service PortsDisable "sip" entry

πŸ” Session Border Controller (SBC) β€” When & Which to Use

A Session Border Controller sits at the edge of your network and handles all SIP traffic β€” rewriting SDP addresses, enforcing security policies, managing NAT traversal, and normalizing codec and protocol variations. For 3CX deployments with remote workers, multiple sites, or complex SIP trunk requirements, an SBC is the cleanest solution to NAT challenges.

When Do You Need an SBC vs Just STUN?

ScenarioSTUN Sufficient?SBC Recommended?Why
Single office, static public IPYesOptionalStraightforward NAT β€” STUN handles it cleanly
Remote workers on home networksNoYesVaried NAT types at home; SBC tunnel is reliable
Multi-site / branch officesPartialYesInter-site call routing & consistent NAT handling
Strict symmetric NAT environmentNoYesSTUN fails with symmetric NAT β€” SBC required
Multiple SIP trunk providersPartialYesSBC normalizes different trunk requirements
Cloud-hosted 3CX (public IP)YesOptionalCloud servers have direct public IPs β€” NAT less of an issue
Best for SMB

3CX Built-In SBC

3CX includes its own SBC as part of the platform. It uses the proprietary 3CX Tunnel (port 5090) to securely connect remote phones back to the main 3CX server β€” bypassing NAT entirely.

  • No additional cost β€” included with 3CX
  • Works with 3CX IP phones and softphones
  • Handles remote workers automatically
  • Tunnel encrypts all signaling and media
Enterprise

Audiocodes Mediant

Audiocodes hardware SBCs (Mediant 500, 800, 2600) provide enterprise-grade NAT traversal, transcoding, and security hardening. Well-tested with 3CX and fully supported.

  • Hardware or virtual deployment
  • Advanced transcoding capabilities
  • SRTP and TLS enforcement
  • Certified 3CX partner device
Open Source

Kamailio / OpenSIPS

Open-source SBC platforms that can be configured as a dedicated SIP proxy and SBC. Powerful but require significant configuration expertise. Best for engineering-led teams.

  • Free and highly customizable
  • Requires Linux admin & SIP expertise
  • Scales to very high call volumes
  • Excellent for carrier-grade deployments
Cloud

Ribbon / Oracle ESBC

Cloud-native or hardware SBCs from Ribbon (formerly GENBAND/SONUS) or Oracle deliver carrier-grade performance with deep 3CX interoperability for large enterprise deployments.

  • Carrier-grade reliability
  • Deep SIP normalization
  • Ideal for 3CX enterprise licensed installs
  • Full SRTP/TLS support

πŸ”§ SBC Configuration Step by Step

For most 3CX deployments, the built-in 3CX SBC is the right choice. Here's how to configure it correctly:

1
Install 3CX SBC on the Remote Site or Edge Device

Download the 3CX SBC installer from the 3CX Management Console. Install it on a dedicated machine (physical or VM) at the remote site, or on a Raspberry Pi / small NUC for branch offices. The SBC needs network access to both the local LAN and the internet.

2
Generate an SBC Provisioning Link from 3CX Management Console

In 3CX Management Console: Admin β†’ SBC β†’ Add SBC. Give it a name, select the target PBX, and 3CX generates a provisioning URL. The SBC uses this URL to auto-configure and authenticate with the main 3CX server.

3
Enter Provisioning URL on the SBC

On the machine running the 3CX SBC, open the SBC web interface (typically http://localhost:5015). Paste the provisioning URL and click Connect. The SBC establishes an encrypted tunnel (port 5090) to the main 3CX server β€” traversing NAT automatically.

4
Assign IP Phones to the SBC

When provisioning IP phones at the remote site, point them to the SBC's local IP address rather than the main 3CX server. The SBC handles all NAT traversal on their behalf β€” phones register locally and calls tunnel back to 3CX centrally.

5
Verify SBC Status and Test Calls

In 3CX Management Console, confirm the SBC shows as Connected with a green status. Make a test call from a phone registered via the SBC. Check for two-way audio. Verify the extension registers correctly in the 3CX extension list.

6
Configure Firewall at Remote Site β€” Only Port 5090 Needed

Unlike a direct 3CX registration (which requires many ports open), an SBC-based deployment only needs port 5090 (TCP+UDP) open outbound from the remote site to the main 3CX server's public IP. This dramatically simplifies remote site firewall rules.

πŸ” Diagnosing NAT Issues in 3CX β€” Troubleshooting Guide

SymptomMost Likely CauseFix
One-way audio (outbound calls)Public IP not set in 3CX NAT settings; SIP ALG activeSet correct public IP in 3CX settings; disable SIP ALG on router
One-way audio (inbound calls)RTP ports not forwarded; SDP mismatchForward UDP 9000–10999; verify local subnet list in 3CX
Calls drop after 30–32 secondsSIP keepalive / re-INVITE blocked; UDP session timeout on NATEnable SIP keepalives; increase NAT UDP timeout to 180s on router
Registration fails / keeps droppingPort 5060 not forwarded; SIP ALG rewriting register packetsForward 5060 to 3CX; disable SIP ALG; check trunk credentials
No audio on internal calls onlyInternal subnet missing from 3CX Local Subnets listAdd missing subnet(s) to 3CX NAT β†’ Local Subnets
Remote phones can't registerPort 5090 not open; SBC not running or misconfiguredOpen port 5090 inbound; verify SBC tunnel is connected in console
WebRTC calls have no audioTURN server not configured; port 3478 blockedConfigure TURN in 3CX settings; open UDP 3478 outbound
Audio quality degraded, not silentInsufficient RTP port range open; packet loss on internet linkVerify full 9000–10999 range open; enable QoS on router for voice

πŸ› οΈ 3CX Diagnostic Tools to Use

  • 3CX Firewall Checker: Built into Management Console β€” Admin β†’ Tools β†’ Firewall Checker. Verifies all critical ports are reachable from the internet.
  • SIP Trace: Admin β†’ Activity Log β†’ SIP Trace. Captures raw SIP messages to identify IP address mismatches in SDP payloads.
  • Extension Registration Report: Shows registration status, IP address, and codec for every extension β€” invaluable for spotting NAT issues.
  • Wireshark on 3CX Host: Capture on the server NIC and filter for sip and rtp. Look at SDP fields β€” if you see private IPs where public should be, NAT settings are wrong.
  • PCAP in 3CX Cloud Console: Cloud-hosted 3CX includes packet capture tools in the admin dashboard β€” use these before requesting support.

βœ… 3CX NAT Configuration Checklist

Run through this checklist after every new 3CX deployment or major configuration change:

  • 3CX Public IP field set to correct static WAN IP (or STUN for dynamic IPs)
  • 3CX Local IP field set to server's static LAN IP
  • All internal subnets added to 3CX Local Subnets list
  • External FQDN configured and resolves correctly to public IP
  • SIP ALG disabled on all routers and firewalls in the network path
  • Port 5060 (UDP+TCP) forwarded to 3CX server's LAN IP
  • Port 5061 (TCP) forwarded for TLS if using encrypted SIP
  • UDP ports 9000–10999 forwarded for RTP media
  • Port 5090 (UDP+TCP) forwarded for SBC tunnel / remote phones
  • Port 443 and/or 5001 forwarded for 3CX Web Client
  • Inbound SIP on 5060 restricted to SIP trunk provider IP ranges only
  • 3CX Firewall Checker run and all tests pass (green)
  • Test call made β€” two-way audio verified from internal and external phone
  • Remote worker phone tested via SBC tunnel β€” two-way audio confirmed
  • NAT UDP timeout on router set to 180 seconds or higher
  • QoS configured on router to prioritize voice (DSCP EF / CS3)
  • 911 / Emergency services address registered for all extensions

Get Your 3CX Running Perfectly

The NetViaVoice team handles 3CX NAT, firewall, SBC, and SIP trunk configuration for businesses worldwide. Let us do it right.

Mon–Sat  Β·  US: +1 201 979 3825  Β·  PK: +92 333 5908806
❓ Frequently Asked Questions
1 Why do 3CX calls work internally but fail or have one-way audio on external calls?
This is the classic NAT symptom. Internal calls work because both endpoints are on the same private network β€” no NAT traversal needed. External calls fail because the SDP body of your SIP messages contains your private IP address (e.g., 192.168.1.10), but the remote SIP trunk tries to send media back to that address β€” which is unreachable from the internet. Fix: set your correct public WAN IP in 3CX Management Console β†’ Admin β†’ Settings β†’ Network β†’ NAT β†’ Public IP. Also ensure SIP ALG is disabled on your router.
2 Do I need an SBC or is STUN enough for 3CX NAT traversal?
For a single-office deployment with a static public IP and no remote workers, STUN is usually sufficient β€” set stun.3cx.com as your STUN server in 3CX NAT settings. However, for remote workers (especially those on home networks with carrier-grade NAT or symmetric NAT), the 3CX SBC is strongly recommended. It creates a persistent encrypted tunnel from the remote location to your 3CX server, completely bypassing NAT β€” it's more reliable than STUN in complex network environments. See our guide on 3CX Bridge Trunk vs Generic SIP Trunk for related configuration decisions.
3 What ports does 3CX need open on the firewall?
The minimum required ports are: 5060 UDP/TCP (SIP signaling), 9000–10999 UDP (RTP media β€” 3CX default range), 5090 UDP/TCP (SBC tunnel for remote phones), and 443/5001 TCP (web client). If using TLS for SIP, also open 5061 TCP. Critical: restrict inbound 5060 to your SIP trunk provider's IP ranges only β€” exposing it to the whole internet is a major security risk. Full details in the port reference table in this article.
4 How do I know if SIP ALG is causing my 3CX problems?
Run a SIP trace in 3CX (Admin β†’ Activity Log β†’ SIP Trace) and examine the Contact and Via headers in SIP messages, and the c= and m= lines in the SDP body. If you see your private IP (e.g., 192.168.1.10) appearing in these fields on traffic that has passed through your router, SIP ALG has either failed to rewrite it correctly or has corrupted the packet. Another tell: calls that work with softphones (which often have their own NAT handling) but fail on hardware IP phones β€” this pattern often points to SIP ALG interference. Disable SIP ALG on your router and test again. See our 3CX Configuration guide for more diagnostics.
5 Can 3CX handle multiple SIP trunks with different NAT requirements?
Yes β€” 3CX supports multiple SIP trunks simultaneously, and each can have independent configuration. Different trunks may have different codec requirements, transport preferences (UDP vs TLS), and NAT behaviors. The key is to configure each trunk's SIP credentials, proxy address, and transport settings independently in the 3CX Management Console. If different trunks require different outbound IP addresses, you may need an SBC with multiple network interfaces, or to use separate SIP profiles per trunk. Read our detailed guide on 3CX and Multiple SIP Trunks for the full configuration walkthrough.