04. Firewall & Router Configuration - 3CX
pixel500w-500x1
Zero Admin
With the new Dashboard
pixel500w-500x1
Bulletproof Security
With SSL certs and NGINX
pixel500w-500x1
Install on $150 Appliance
Intel MiniPC architecture
pixel500w-500x1
New, Intuitive Windows Client
More themes, more UC
pixel500w-500x1
More CRM Integrations
Scripting Interface to add your own
pixel500w-500x1
Improved Integrated Web Conferencing
iOS and Android apps included
pixel500w-500x1
Personal Click2Meet URLs

04. Firewall & Router Configuration

Firewall & Router Configuration

On this topic

Firewall & Router Configuration

Introduction

Step 1: Configure the ports  for your SIP Trunk / VoIP Provider

Step 2: Configure the ports for remote 3CX clients

Step 3: Configuration of ports for Remote IP Phones / Bridges via Direct SIP

Step 4: Configuration of ports for 3CX WebMeeting

Step 5: Disable SIP ALG

Step 6: Run the Firewall checker

Step by step instructions for popular firewalls

See Also

Introduction

If you plan to use remote extensions or a VoIP Provider, you will have to make changes to your firewall configuration, in order for 3CX Phone System to communicate successfully with your SIP trunks and remote IP Phones. This chapter gives you a generic overview of the ports that need to be opened/statically forwarded on your firewall. We also have detailed guides for popular firewalls that take you step by step to the correct configuration of your firewall. You can learn more about Routers, NAT, VoIP and Firewalls in this article.

Step 1: Configure the ports  for your SIP Trunk / VoIP Provider

Open the following ports to allow 3CX Phone System to communicate with the VoIP Provider/SIP Trunk & WebRTC:

  • Port 5060 (inbound, UDP) for SIP communications
  • Port 9000-9500 (inbound, UDP) for RTP (Audio) communications, which contain the actual call. Each call requires 2 RTP ports, one to control the call and one for the call data. Therefore, you must open twice as many ports if you wish to support simultaneous calls.

Note that the above port ranges are the default ports in 3CX Phone System. You can adjust these ports from the 3CX Management Console, in the “Settings” > “Network” > “Ports” node.

Step 2: Configure the ports for remote 3CX clients

To allow users to use their 3CX clients remotely, be they on Android, iOS, Mac or Windows, you must open the following ports:

  • Port 5090 (inbound, UDP and TCP) for the 3CX tunnel
  • Port 443 (inbound, TCP) HTTPS for Presence and Provisioning 
    (Unless you have chosen custom ports).
  • Port 443 (outbound, TCP) for Google Android Push:
  • Port 2195, 2196 (outbound, TCP) for Apple iOS Push 

PUSH messages are sent by 3CX Phone System to Extensions using smartphones in order to wake up the devices to take calls. This greatly enhances the usability of the smartphone clients.

Step 3: Configuration of ports for Remote IP Phones / Bridges via Direct SIP

For remote IP Phones and bridges you have the choice of using the 3CX SBC (Tunnel) or Direct SIP. The 3CX SBC service will bundle all VoIP traffic over a single port and vastly simplify firewall configuration and improve reliability. No additional configuration is required because the 3CX SBC will use the same ports as the 3CXPhone clients use. More information on SBC can be found here.

If you wish to connect remote extensions via direct SIP, you must open the following ports (most of them are already opened if you use a SIP trunk):

  • Port 5060 (inbound, UDP and TCP), Port 5061 (inbound, TCP) (if using secure SIP) - already open if using SIP Trunks.
  • Port 9000-9500 (inbound, UDP) for RTP - already open if using SIP Trunks.
  • Port 443 (inbound, TCP) HTTPs for provisioning. (Unless you have chosen custom ports).

Step 4: Configuration of ports for 3CX WebMeeting

In order to be able to create and participate in web based meetings the 3CX hosted cloud service must be able to communicate with the 3CX pbx and vice versa. In order to do so the following ports need to be forwarded and outbound traffic needs to be allowed to:

  • Port 443 (outbound, TCP) to webmeeting.3cx.net (the ip may changes and it is recommended to allow traffic to the fqdn rather then to the ip address when possible)
  • Port 443 (inbound, TCP unless you have chosen custom ports) to notify users of incoming web meetings

Step 5: Disable SIP ALG

To maximize your chances of success, make sure you choose a device that does not implement a SIP Helper or SIP ALG (Application Layer Gateway), or choose a device on which SIP ALG can be disabled. The following links are examples of how to switch off ALG on popular routers:

Step 6: Run the Firewall checker

After configuring your firewall, run the 3CX firewall checker to ensure that configuration is correct!

Step by step instructions for popular firewalls

Example configurations for popular firewalls:

See Also

You might also be interested in:

<