Verifying SQL connection between server and workstation (On Prem)
To confirm whether Windows Firewall is causing SQL Server network connection issues, systematically test connectivity with and without the firewall rules.
Below is a focused checklist you can follow from the SQL server and the client.
1. Confirm the SQL port and instance
On the SQL Server machine:
- Open SQL Server Configuration Manager →
SQL Server Network Configuration→Protocols for <instance>. - Ensure TCP/IP is Enabled.
- In
TCP/IP→Properties→IP Addressestab:- Under
IPAll, note:TCP Port(e.g.,1433), and- Ensure
TCP Dynamic Portsis blank if you’re using a fixed port.
- Under
- Restart the SQL Server service.
You must know which port to test (e.g., 1433).
2. Test connectivity ignoring SQL Server (pure network test)
From the client machine (the machine connecting to SQL):
2.1 Ping the server
cmd
ping SERVER_NAME_OR_IP
- If ping fails, there may be a broader network issue or ICMP blocked; this doesn’t always mean the SQL port is blocked, but it’s a sign to check network.
2.2 Test the SQL port directly (PowerShell)
powershell
Test-NetConnection -ComputerName SERVER_NAME_OR_IP -Port 1433
Look at:
TcpTestSucceeded : True→ The port is reachable from the client (likely not blocked by firewall).TcpTestSucceeded : False→ Something is blocking or not listening:- Could be Windows Firewall, other firewall, or SQL not listening on that port.
3. Temporarily disable Windows Defender Firewall (to isolate the cause)
Only do this briefly, in a safe test environment.
On the SQL Server machine:
- Open Control Panel → System and Security → Windows Defender Firewall.
- Click Turn Windows Defender Firewall on or off.
- For the profile in use (Domain/Private/Public), select Turn off Windows Defender Firewall.
- Click OK.
Then, from the client, rerun:
powershell
Test-NetConnection -ComputerName SERVER_NAME_OR_IP -Port 1433
and/or try connecting with SSMS.
Interpretation:
- If it works when firewall is OFF, and fails when firewall is ON →
The firewall is causing/participating in the problem. - If it fails even when firewall is OFF → The cause is not Windows Firewall (look at SQL config, other firewalls, routing, etc.).
Re‑enable the firewall right after the test.
4. Verify or create proper inbound firewall rules for SQL
If the firewall is confirmed as the blocker, fix it by adding rules (rather than leaving the firewall disabled).
On the SQL Server machine:
-
Open Windows Defender Firewall with Advanced Security.
-
Go to Inbound Rules.
-
Look for an existing rule:
- Allowing
sqlservr.exe, - Or allowing TCP port 14331433 (or your SQL port).
- Allowing
-
If none exist or not enabled, create one:
- Right‑click Inbound Rules → New Rule…
- Choose Port → Next.
- Protocol: TCP.
Specific local ports:1433(or your port) → Next. - Select Allow the connection → Next.
- Apply to Domain and Private (and Public if needed) → Next.
- Name: e.g.,
SQL Server TCP 1433→ Finish.
If you use a named instance with dynamic ports, either:
- Set a fixed port (recommended), or
- Also allow:
SQL Server Browserservice inbound and- UDP port 14341434.
5. Confirm firewall rule works
With the firewall ON and rule created:
From the client:
- Test connection again:
powershell
Test-NetConnection -ComputerName SERVER_NAME_OR_IP -Port 1433
- Should now show
TcpTestSucceeded : True.
- Test with SSMS:
Server name:- Default instance:
SERVER_NAMEorSERVER_IP - Named instance:
SERVER_NAME\INSTANCE_NAMEorSERVER_NAME,1433
- Default instance:
- Try connecting. If SSMS works and
Test-NetConnectionsucceeds, firewall is no longer the blocker.
6. Quick decision tree
From the client, testing port 14331433:
-
Firewall OFF →
Test-NetConnectionSucceeds
Firewall ON → Fails
→ Windows Firewall is blocking. Fix rules. -
Firewall OFF →
Test-NetConnectionFails
→ Not Windows Firewall:
- SQL service not listening
- Wrong port
- Network routing/VLAN issues
- Other security appliances / third‑party firewall.

