This guide will show how to configure an AVM Fritzbox router / firewall as a border device with 3CX Phone System in the LAN. The tests were made using a FritzBox 7170 with firmware version 29.04.76
Note: This document will show screenshots in German as we could not upload an English language firmware on the device. However some settings are translated from German to English.
Important: The FritzBox has an integrated SiP Server inside. This makes the usage and natting of ports 5060 TCP and UDP to the 3CX Phone System impossible because the Fritzbox SIP server will not allow you to do this. For that reason we have to configure 3CX to “listen” for SIP traffic on a different port.
The status of this type of firewall is “Not Supported”.
Nat Type: Not tested
Configuration of the firewall will never be carried out by the 3CX Staff at any point and must be made by the System-Administrator of the company. You must understand the risk of opening ports to the World Wide Web. Read http://www.3cx.com/blog/docs/securing-hints/ for more information and agree with the terms stated. The provided guide is based on the best known effort to configure the device(s). 3CX is not liable for any misguidance may made in this guide.
Note: Screenshots are for illustration purposes only and settings should not be copied from the screenshots.
For an always up to date list of the ports that need to be open check “Firewall & Router Configuration“, as the ports may depend on the version you are using.
1. Activate Expert Mode on the Router
- Press on “Einstellunden” (Settings) in the top bar.
- Click “Erweiterte Einstellungen” (Advanced Settings) / “System” (System) / “Ansicht” (View)
- Check the“Expertenansicht aktivieren” (activate expert view) box.
2. Enable NAT for SIP requests through the AVM FritzBox.
This option is only available and needed when you use FritzBox in “LAN Mode” and not intended for usage in DSL Mode.
- Open “Erweiterte Einstellungen” (Advanced settings) menu, go to “Telefonie” (Telefony) and then the “Erweiterten Einstellungen” (Advanced settings).
- Check the check-box for “Portweiterleitung des Internet-Router für Internettelefonie aktiv halten” (enable port forwarding of the Internet-Router for internet calls).
- Set the value to 5 minutes.
3. Set the NAT rules that will be used for the PBX
- Open the “Erweiterte Einstellungen” (Advanced settings) menu,select “Internet” (Internet), then “Freigaben” (Sharing) and click the tab “Portfreigaben” (port sharing).
- The following example shows the PBX on IP: 10.172.0.141
- The port for SIP CAN NOT BE 5060 as normal and must be changed. Alternatively you may reconfigure your AVM as documented here.
- This example shows it for port 5062
. 4. Add the Ports you Need in the FritzBox Configuration
For an always up to date list of the ports that need to be open check “Firewall & Router Configuration“.
- HTTP TCP 5000 IF ABYSS WEBSERVER OR TCP 80 IF IIS WEB SERVER
- HTTPs TCP 5001 IF ABYSS WEBSERVER OR TCP 443 IF IIS WEB SERVER
- SIP TCP/UDP 5060
- SECURE SIP TCP 5061
- RTP UDP 9000-9500
- TUNNEL TCP/UDP 5090
3CX Phone System Setup
1. Setting up the 3CX PBX
Due to the FritzBox catching all traffic to port 5060 we have to change the SIP Port in the 3CX Phone System.
In the FritzBox port forwarding configuration the SIP Port has been set to 5062 for TCP and UDP by following the steps described in the “FritzBox Setup” part of this guide.
The 5062 port has to be set in the PBX as well.
- Log in to the 3CX Management Console using your credentials
- Click on “Settings” menu and go to “Network”
- Change the SIP Port accordingly (5062 was used here as the example)
Important: Global changes that need to be made in this scenario
- The provisioning files will be updated but the phones will need to be re-provisioned with the new settings.
- All phones in your network have to register to Port 5062 and not more to 5060 as usual.
- Example: Configuration of a Snom Phone
- Example: Configuration of a 3CXPhone