How to Connect to Remote SQL Server Database Over Internet Using Public Static IP and Port Number?

2k Views Asked by At

I want to connect to my remote SQL Server over a different network, namely the internet.

Even though my connection with Local IP is successful, I get connection error with Public IP (ex: 88.240.xxx.xxx).

I followed the steps below.

  1. I enabled SQL Server and Windows authentication modes
  2. I created a user
  3. I have enabled SQL Server to allow remote connections
  4. TCP/IP is enabled in SQL Server Configuration
  5. I set the TCP/IP>>TCPAll field to 1433
  6. I restarted SQL Server
  7. I added a rule for TCP and UDP in Windows Firewall
  8. I did port forwarding from the modem settings

After these steps, when I type local ip in the server name field, the connection is successful, but my connection with the public ip is lost. If anyone knows a way around this can help?

Error

A network-related or instance-specific error occurred while establishing a connection to SQL Server.
The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

Allowing Remote Connection

SQL Server authentication mode

SQL Server Configuration settings

Port Forwarding

0

There are 0 best solutions below