Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application not connection to sqlserver outside the firewall

So I have an application that connects to our SQLServer. This works on any server behind the firewall just fine.

When i put it out on our live server, outside the firewall the connection to the sqlserver fails with this 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: 
SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

I know this is due to the firewall though the network admin claims the firewall is allowing it through (has even gone to the point of saying "your doing it wrong")

What can I do to see where it is failing exactly to see if it really is the firewall and prove to him that it is. I am using the IP of the machine so it is not a DNS issue. Any other ideas?

like image 733
twal Avatar asked Apr 10 '26 07:04

twal


1 Answers

With all due respect, your admin is right by telling you you're doing it wrong, assuming if what you mean by "outside the firewall" means outside of your company's network. Something like a database server should never be exposed to external connections.

Edit: Never mind, this is a connection from the DMZ.

So the only thing I can think of is to try and telnet to that machine on port 1433 (while logged into the web server) and see if you get a connection error. You're not using SSPI so I don't think security would be the issue.

If telnet fails then you can take that to your network admin as proof that the problem is the firewall.

like image 151
kprobst Avatar answered Apr 12 '26 09:04

kprobst