Configuring SQL Server Port Access for SharePoint Environments: A Technical Guide


Introduction

In a Microsoft SharePoint environment—whether on-premises or hybrid—Microsoft SQL Server plays a critical role as the data backbone. SharePoint stores its configuration, content, service applications, and search data in SQL Server databases. Ensuring proper communication between SharePoint servers and SQL Server instances is not only a matter of functionality but also one of security and performance.

One of the most overlooked but essential configuration tasks during SharePoint deployment or troubleshooting is the firewall rule configuration for SQL Server communication. This article provides a detailed technical guide for configuring SQL Server port access, focusing on ports that must be opened in a Windows Firewall or network firewall to allow proper operation of a SharePoint environment.


Default SQL Server Communication Ports

Microsoft SQL Server uses a set of default ports depending on the configuration of the instance (default vs. named) and the services enabled. Below are the most commonly used ports and their roles.

  1. TCP 1433
    This is the default port used by the SQL Server Database Engine for the default instance. SharePoint typically connects to this port unless configured otherwise.
  2. UDP 1434
    Used by the SQL Server Browser service. This is critical when using named instances, as it helps client applications discover the dynamic TCP port to which a named instance is listening.
  3. Dynamic TCP Ports (1024–65535)
    When a named instance of SQL Server is used, it may use a dynamic TCP port, unless configured to use a static port.
  4. TCP 2383
    This is the default port for SQL Server Analysis Services (SSAS).
  5. TCP 2382
    Used by the SQL Server Browser to redirect client connections to SSAS instances.
  6. TCP 135 (RPC)
    Required for some remote procedure call operations, especially when using DCOM and SQL Server Management Tools for remote operations.
  7. TCP 445 and TCP 139
    Used for SMB communication (file sharing), sometimes relevant during backup operations or remote PowerShell tasks.
  8. TCP 4022
    Used by SQL Server Service Broker, which may be used in advanced SharePoint custom solutions or third-party integrations.
  9. Custom ports
    It’s possible to configure SQL Server to listen on custom static ports, especially in hardened or DMZ environments.

Static vs. Dynamic Port Allocation

By default, SQL Server named instances use dynamic ports, which are assigned at startup. This can complicate firewall rules. For environments like SharePoint, it is strongly recommended to configure static ports for predictability and ease of network rule configuration.

To set a static port:

  1. Open SQL Server Configuration Manager.
  2. Navigate to SQL Server Network Configuration > Protocols for [InstanceName].
  3. Open the TCP/IP properties.
  4. Under the IP Addresses tab, clear the “TCP Dynamic Ports” field and set a fixed value under “TCP Port”.
  5. Restart the SQL Server service.

Firewall Configuration Guidelines

For Windows Firewall, follow these steps:

  1. Open Windows Defender Firewall with Advanced Security.
  2. Go to Inbound Rules > New Rule.
  3. Choose Port, then TCP, and enter the necessary port (e.g., 1433).
  4. Allow the connection.
  5. Apply to Domain, Private, and/or Public profiles as needed.
  6. Name the rule (e.g., “SQL Server Port 1433”) and finish.

Repeat this for each required port.

For enterprise environments using perimeter firewalls, these ports must be explicitly allowed between SharePoint servers and the SQL back-end. Network segmentation and access control lists (ACLs) should ensure that only designated application servers can communicate with SQL.


Security Considerations

  1. Restrict access to SQL Server ports to only the SharePoint servers using IP whitelisting or VLAN rules.
  2. Use encryption via SSL/TLS for SQL Server connections.
  3. Regularly monitor logs for unusual port activity.
  4. Avoid exposing SQL Server ports to the public internet.

Conclusion

Properly configuring firewall rules for SQL Server is vital in ensuring reliable SharePoint operation. It is recommended to use static ports for predictable behavior and implement least privilege principles when opening network paths. Understanding the port requirements and configuring firewalls accordingly helps maintain a secure, performant SharePoint environment.


Summary Table: SQL Server Port Requirements for SharePoint

PortProtocolPurposeApplies ToRecommended
1433TCPDefault SQL Server instanceDefault instance communicationYes
1434UDPSQL Server Browser for named instancesNamed instance discoveryYes
2383TCPSQL Server Analysis ServicesSSASOptional
2382TCPRedirect to SSAS instanceSSASOptional
135TCPRPC / DCOM communicationsManagement tools / PowerShellConditional
445, 139TCPSMB file sharingBackups, network sharesConditional
4022TCPSQL Server Service BrokerAdvanced scenariosOptional
CustomTCPStatic port for named instanceHardened environmentsYes

References

Edvaldo Guimrães Filho Avatar

Published by