How to connect our cloud-based 3CX to our locally hosted SQL server.

Status
Not open for further replies.

KarstenBerg

Gold Partner
Advanced Certified
Joined
May 8, 2020
Messages
1
Reaction score
0
Hello there,

as mentioned in the subject already we would like to connect our cloud-based 3CX installation (running on a Debian 9-VM in an external data center) to an SQL-server that we are running in our company's local area network.
How do you implement this? (Hint: This does NOT help us in our scenario: https://www.3cx.com/docs/sql-database-pbx-integration/ )

Thank you in advance for your help, have a nice day and stay healthy.

With friendly greetings from Troisdorf (near Cologne),

Karsten Berg
 
What kind of connection you need to do if the integration with databases is not helpful?

Regarding the connection itself, you need to properly configure your firewall to allow this connection. Your WAN facing router should allow inbound connections from the IP address of your 3CX server in the cloud, and should route this inbound traffic to the database server in your LAN.

Once you enable this, the connection will be possible. Then, the database integration template could get the contact details from your database, if that's what you want.
 
To expand on Ernesto's suggestion, on your firewall you need to open TCP 1433, and UDP 1434 if you are using a named instance (default ports).

You also need to use the SQL Configuration Manager to configure your SQL Server to allow for remote connections. That means you have to enable TCP on your client protocols, and you need to restart the SQL service and START the SQL Browser service.

The one item that is often overlooked in many instructions for enabling remote connections is the following:

Using the SQL Configuration Manager:

1. In the SQL Server Network Configuration section, select Protocols for <your instance name>
2. Ensure TCP/IP is Enabled. To edit this setting right-click and select properties
3. If necessary, change the "Enabled" setting to "Yes"
4. Select the IP Address tab
5. Scroll down to IPAll
6. Change TCP Port from 0 (or blank) to 1433
7. Apply


One last thing to consider. Port 1433 is a commonly tested port by hackers. You absolutely MUST configure your firewall to only allow access to this port from the IP address of your 3CX server. Even better, change the default ports. If you don't carefully secure this port you are pretty much guaranteed that some hacker will be up to mischief within hours (if not minutes).
 
Status
Not open for further replies.

Forum statistics

Threads
112,326
Messages
591,900
Members
165,479
Latest member
Senergia