ngroksql-server-config-manager

How to configure ngrok for SQL Server access


I would like to test a website in development hosted in a remote location against a sql server instance on my local machine. I was thinking I could run ngrok locally and update the connection string on the remote website appropriately, but I'm not sure what parameters I need to specify.

I've tried ngrok tcp 12345 and ngrok http 12345

In SQL Server Configuration Manager I've enabled TCP/IP for the SQL Express instance I want to use and set the port to listen on to 12345 (actually, a different number, but we'll say 12345 for the sake of this post). And I then restarted SQL Server.

I don't believe it's necessary for me to make holes in the firewall, but just in case I've temporarily disabled it entirely while I test this.

To test locally, I am taking the url ngrok provides and putting it in the connection dialog in SQL Management Studio, but I can't get it to connect.

What am I missing?


Solution

    1. Set up Ngrok
    2. Run ngrok on tcp on the SQL port (by default is 1433) ngrok tcp 1433

    You will get an url like tcp://3.tcp.ngrok.io:12345

    In the "Connect to Server Dialog" type: