SQL Server remote connection not working

Rory Folster 1 Reputation point
2022-11-16T11:19:50.86+00:00

Hi all, I have been trying to connect to my SQL Server instance remotely for hours now.. I have set up the configuration correctly inside of SSCM, allowing connections and changing the TCP to 1433. I have added Windows Firewall settings for both TCP and UDP using 1433, I have port forwarded TCP and UDP using 1433, I have enabled remote connections in SSMS.

I am able to connect to the instance using either the instance name or the local ip address, but not the public ip. I am using a home network.

I can see the port is open, using www.canyouseeme.org.

I have restarted the MYSQLSERVER service, and the Server Browser, I have even restarted my PC.

I am stuck as I have followed multiple tutorials but they all contain similar instructions, which as far as i know, are set up correctly.

Any help is much appreciated!

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,333 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Dan Guzman 9,226 Reputation points
    2022-11-16T11:52:25.64+00:00

    If I understand correctly, you are running a SQL Server instance on your local home network and you cannot connect remotely from the internet.

    To verify network connectivity, run the command below from a command-prompt on the remote machine, replacing "127.0.0.1" with the actual IP public address you are trying to connect to.

    powershell -Command "tnc -ComputerName 127.0.0.1 -Port 1433"  
    

    If the above fails but www.canyouseeme.org succeeds, it suggests your public IP and/or port 1433 is not allowed from the remote machine.

    Note that the SQL Server Browser and UDP are not involved when you specify only the IP address or host name in the connection string. Only port TCP 1433 is used in this scenario.