I’m using n8n cloud. I have multiple SQL Servers but i can’t connect to one specifically. I get the error Failed to connect. I can connect from MS SQL Management studio, powerBI and if I run the utility PortQueryUI from Microsoft everything seems Ok, and ports are open.
What is the error message (if any)?
Failed to connect
Quetsion?
I think that the IP is bloked either from the n8n Cloud service or from my ISP Provider.
Does anyone Know the IP that n8n Cloud uses, is it always the same so I can talk to my ISP Provider?
What other ideas you have that can be the problem?
The solution I implemented but its not optimal es adding the server as linked server to another SQL Server, and I make the query jumping trought that server.
Make sure you can connect to the SQL host (ping, telnet) from the server running n8n on the correct port (usually 1433 or a specific one). If you’re using n8n Cloud, make sure you’ve whitelisted the n8n service IPs in your SQL Server firewall.
Also, set encrypt = false or trustServerCertificate = true if you’re using self-generated certificates.
You can connect fine from SSMS and PowerBI, so the issue is with how n8n Cloud reaches your SQL Server. n8n uses fixed outbound IPs per region — you need to whitelist those in your SQL Server firewall (or provide them to your ISP if they filter traffic). Check n8n’s docs for the IP list, make sure SQL auth + TCP/IP are enabled, and match encryption settings. Since your linked server workaround proves the DB is reachable, once the cloud IPs are allowed the direct connection should work. If the DB got inconsistent from failed queries, tools like Stellar Repair for MS SQL can help verify and repair before retrying.