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
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)
- 3CX Built-In NAT Settings β Where to Configure
- Required Ports for 3CX β Full Port Reference Table
- Firewall Rules & Port Forwarding for 3CX
- SIP ALG β Why You Must Disable It & How
- Session Border Controller (SBC) β When & Which to Use
- SBC Configuration Step by Step
- Diagnosing NAT Issues in 3CX β Troubleshooting Guide
- 3CX NAT Configuration Checklist
- Frequently Asked Questions
π 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.
192.168.1.50
192.168.1.10
β οΈ SDP not rewritten
Sees private IP!
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 Setting | What It Does | Recommended Value |
|---|---|---|
| Public IP | The WAN (internet-facing) IP 3CX advertises in SDP | Your static public IP or DDNS hostname |
| Local IP | The LAN IP of your 3CX server | Server's static private IP (e.g., 192.168.1.10) |
| STUN Server | Used to auto-detect public IP if dynamic | stun.3cx.com or stun.l.google.com:19302 |
| NAT Mode | Determines how 3CX resolves the public/private IP mismatch | Auto or Static (prefer Static with fixed public IP) |
| Local Subnets | Ranges where 3CX uses private IPs in SDP (internal calls) | All your internal LAN subnets (e.g., 192.168.1.0/24) |
| External hostname | FQDN used for SIP and WebRTC clients | Your 3CX FQDN (e.g., pbx.yourdomain.com) |
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
π’ 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.π‘ 3CX Web Client
443 TCP HTTPS for 3CX Web Client, Management Console, and WebRTC calls. Standard HTTPS.π‘ 3CX Web Client (Alt)
5001 TCP Alternative HTTPS port for 3CX Web Client if 443 is in use by another service.π’ 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.| Port | Protocol | Direction | Purpose | Priority |
|---|---|---|---|---|
| 5060 | UDP / TCP | Inbound + Outbound | SIP signaling with trunk & clients | Critical |
| 5061 | TCP | Inbound + Outbound | SIP TLS (encrypted signaling) | Critical |
| 9000β10999 | UDP | Inbound + Outbound | RTP voice media | Critical |
| 5090 | UDP + TCP | Inbound | 3CX SBC tunnel / remote phones | Critical |
| 443 | TCP | Inbound | 3CX Web Client & Management Console | High |
| 5001 | TCP | Inbound | Alternate HTTPS for 3CX Web Client | High |
| 3478 | UDP | Outbound | STUN server communication | Medium |
| 80 | TCP | Inbound | HTTP redirect to HTTPS | Medium |
π₯ 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)
# 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.
| Router / Firewall Brand | Where to Disable SIP ALG | Setting Name |
|---|---|---|
| Cisco IOS Router | Global config mode | no ip nat service sip udp port 5060 |
| Ubiquiti EdgeRouter | Config β Firewall/NAT β ALG | Disable SIP under ALG settings |
| pfSense / OPNsense | System β Advanced β Firewall | Uncheck "Enable SIP Proxy" |
| Fortinet FortiGate | System β Feature Visibility | Disable SIP ALG in VoIP profile |
| Netgear (consumer) | Advanced β WAN Setup | Uncheck "Disable SIP ALG" |
| TP-Link (consumer) | Advanced β NAT Forwarding β ALG | Disable SIP under ALG |
| SonicWall | Network β VoIP β Settings | Disable "SIP Transformations" |
| Mikrotik | IP β Firewall β Service Ports | Disable "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?
| Scenario | STUN Sufficient? | SBC Recommended? | Why |
|---|---|---|---|
| Single office, static public IP | Yes | Optional | Straightforward NAT β STUN handles it cleanly |
| Remote workers on home networks | No | Yes | Varied NAT types at home; SBC tunnel is reliable |
| Multi-site / branch offices | Partial | Yes | Inter-site call routing & consistent NAT handling |
| Strict symmetric NAT environment | No | Yes | STUN fails with symmetric NAT β SBC required |
| Multiple SIP trunk providers | Partial | Yes | SBC normalizes different trunk requirements |
| Cloud-hosted 3CX (public IP) | Yes | Optional | Cloud servers have direct public IPs β NAT less of an issue |
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
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
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
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:
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.
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.
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.
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.
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.
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
| Symptom | Most Likely Cause | Fix |
|---|---|---|
| One-way audio (outbound calls) | Public IP not set in 3CX NAT settings; SIP ALG active | Set correct public IP in 3CX settings; disable SIP ALG on router |
| One-way audio (inbound calls) | RTP ports not forwarded; SDP mismatch | Forward UDP 9000β10999; verify local subnet list in 3CX |
| Calls drop after 30β32 seconds | SIP keepalive / re-INVITE blocked; UDP session timeout on NAT | Enable SIP keepalives; increase NAT UDP timeout to 180s on router |
| Registration fails / keeps dropping | Port 5060 not forwarded; SIP ALG rewriting register packets | Forward 5060 to 3CX; disable SIP ALG; check trunk credentials |
| No audio on internal calls only | Internal subnet missing from 3CX Local Subnets list | Add missing subnet(s) to 3CX NAT β Local Subnets |
| Remote phones can't register | Port 5090 not open; SBC not running or misconfigured | Open port 5090 inbound; verify SBC tunnel is connected in console |
| WebRTC calls have no audio | TURN server not configured; port 3478 blocked | Configure TURN in 3CX settings; open UDP 3478 outbound |
| Audio quality degraded, not silent | Insufficient RTP port range open; packet loss on internet link | Verify 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.