Determine if a Firewall is Blocking SQL Server - microsoft/CSS_SQL_Networking_Tools GitHub Wiki

Determine if a Firewall is Blocking SQL Server

Firewalls to not block local connections, so we can test local vs. remote TCP connectivity to see if a firewall is blocking the SQL Server port.

If both local and remote connections fail, then SQL is not started or not listening on the port we suspect.
If remote connections fail and local connections succeed, then this indicates a firewall issue.
If both succeed, then move on to test the connection with a UDL file.

Testing with TELNET

TELNET may not be on your machine by default. You can enable it as a Windows Feature via the Server Manager. This does not require a reboot.

TELNET SQLPROD01 1433
---------------------------
Connecting To SQLPROD01...Could not open connection to the host, on port 1433: Connect failed

If TELENET succeeds, you will be presented with a blank console window.

Testing with PowerShell

Test-NetConnection SQLPROD01 -port 1433

WARNING: Name resolution of SQLPROD01 failed

ComputerName   : SQLPROD01
RemoteAddress  :
InterfaceAlias :
SourceAddress  :
PingSucceeded  : False

Test-NetConnection localhost -port 1433

ComputerName     : localhost
RemoteAddress    : ::1
RemotePort       : 1433
InterfaceAlias   : Loopback Pseudo-Interface 1
SourceAddress    : ::1
TcpTestSucceeded : True