What ports does SQL Server need to communicate with a web server?

438    Asked by Ankesh Kumar in Salesforce , Asked on Apr 23, 2021

 If I have a web server trying to communicate to a SQL Server through a firewall, and the firewall has completely closed both ways (inbound AND outbound), I know I have to open port 1433 from the webserver to the SQL Server in that direction. However, do I need to open any ports from the SQL Server to the webserver for the SQL activities to work? Does SQL Server respond back with any other ports?

Answered by Anisha Dalal

I would suggest following the guidelines provided by Microsoft here as they will definitely help you resolve What port does SQL server use: TCP/IP port numbers required to communicate to SQL overall a firewall By default, when an application requests a socket from the system for an outbound call, a port number between the values of 1024 and 5000 is supplied which has been brought up in the above statement in your comments to the other answers. This is something you have to handle on your firewall. The client chooses the port it wants to be communicated back on. As stated later down in the article above your firewall rules have to allow the dynamic allocation to occur. I don't work with the application side but there might be something you do to force the port it wants to talk on.



Your Answer

Interviews

Parent Categories