Cannot connect to Remote SQL Server

I’m having trouble with connecting to a Remote SQL Server Instance.

My container, right now, is fairly basic, it just contains a WebApi2 Website, using microsoft/iis as the base image.

Our SQL Server is hosted on a Development server elsewhere on our network.

Running the application on my machine connects to the server just fine, but through the container it is not able to connect.

The SQL Server is an instance, and I have tried multiple connection strings (with and without ports), and added the server to the Hosts file, etc. All with no luck. I keep getting Unable to find server, or timeout errors.

Any help would be appreciated!

what is the ip address of the sql server?

if you docker attach web_container_id
can you ping the sql server address?

Yes, I was able to Ping the SQL Server.

Also - I ran another test, where my WebAPI would just make a call to our production API through a regular web call, and that request also did not go out.

is there a firewall on the sql server? does it allow the ip address of the container to go thru?

There is no firewall for the SQL Server for internal traffic.

I’ve done some packet tracing, and there are no packets coming out of this container to any of the other servers. The only traffic I see is the requests being made to the WebApi, and it’s response.

It sounds to me like there is a firewall in the container that is preventing outbound connections?

I’ve figured it out. It has nothing to do with Docker or Windows… it’s Symantec.

I found this forum post:

I’m using the same version of Symantec Endpoint, and once I disabled it, the container was able to communicate to the outside world.

Hopefully Symantec puts out a fix soon.