Search code examples
sql-serverngrok

Cannot login to SQL Server using ngrok


Today I tried to login to a local SQL Server using ngrok with some tools (even Microsoft ones) but if I use the TCP link that ngrok gave me, it says that is impossible to login (code 18456). I searched in the MS forum but with the generic code "1" I cannot know what's wrong in the connection. If I try to login as usual with identical credentials, it works perfectly (with "as usual" I'm talking about logging with the server name like MACHINE\SERVERNAME).

NGROK CONFIGURATION

command to start ngrok:

ngrok tcp 1433

ERROR CODES

Error code 18456, state code 1

I tried I think every single one of the posts on Stack Overflow but no one worked. If it can be helpful I'm running Win11 latest (21H2). Thanks in advance.


Solution

  • Don't really know why, but after investigating some logs I founded out that "something" else was trying to do something with the port 1433, so I tried to login after a clean boot and it works perfectly. Now I created a brand new VM with win10 and it works.