Skip to content
statance
MenuClose
← All ports

Port 1433: Microsoft SQL Server

High risk

Port 1433 is the default port for Microsoft SQL Server. Named instances use dynamic ports, which the SQL Server Browser service advertises on UDP 1434. It should not be reachable from the public internet.

Port
1433
Protocol
TCP
Service
Microsoft SQL Server
Expose to internet?
No
Also used by
Azure SQL (TDS), SQL Server Express

Is port 1433 safe to open?

Internet-facing SQL Server is constantly brute-forced, especially against the sa account. A successful login gives access to the data and, if xp_cmdshell is enabled, to the operating system. Databases should sit behind the application, not on the internet.

How to secure Microsoft SQL Server

  • Allow 1433 only from application servers, or reach it through a VPN or bastion.
  • Disable the sa login or give it a long random password; prefer Windows authentication.
  • Keep xp_cmdshell disabled.
  • Force encrypted connections and keep SQL Server on a supported, patched release.

Check if port 1433 is open

Linux: what is listening on this port

sudo ss -tlpn | grep ':1433 '

Windows (PowerShell): what is listening

Get-NetTCPConnection -LocalPort 1433 -State Listen | Select-Object LocalAddress, OwningProcess, @{n='Process';e={(Get-Process -Id $_.OwningProcess).Name}}

From another machine: is it reachable

nc -zv HOST 1433 # or nmap -p 1433 HOST # Windows Test-NetConnection HOST -Port 1433

Test the Microsoft SQL Server service itself

sqlcmd -S HOST,1433 -U USER -Q "SELECT @@VERSION"

Restrict port 1433 in the firewall

Replace 10.0.0.0/8 with the network or address that needs access. Docker publishes container ports through its own iptables rules, which bypass ufw; bind published ports to 127.0.0.1 (-p 127.0.0.1:1433:1433) instead of relying on the host firewall.

ufw: allow only your private network, deny everyone else

sudo ufw allow from 10.0.0.0/8 to any port 1433 proto tcp sudo ufw deny 1433/tcp

firewalld: allow one source network only

sudo firewall-cmd --permanent --remove-port=1433/tcp sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.0.0/8" port port="1433" protocol="tcp" accept' sudo firewall-cmd --reload

iptables

sudo iptables -A INPUT -p tcp --dport 1433 -s 10.0.0.0/8 -j ACCEPT sudo iptables -A INPUT -p tcp --dport 1433 -j DROP

Windows Firewall (PowerShell, as Administrator)

New-NetFirewallRule -DisplayName "Block 1433 from internet" -Direction Inbound -Protocol TCP -LocalPort 1433 -RemoteAddress Internet -Action Block

Monitor port 1433

Run a TCP port monitor against your public IP on port 1433: here, a failed connection is the healthy result, so you know the firewall is still doing its job. On Linux, the Statance agent also reports every listening port on the server. TCP port monitoring.

Related ports

Port 3306MySQL / MariaDBHigh risk
Port 5432PostgreSQLHigh risk
Port 1521Oracle Database (TNS listener)High risk

FAQ

What is port 1433 used for?

Port 1433 is the default port for Microsoft SQL Server. Named instances use dynamic ports, which the SQL Server Browser service advertises on UDP 1434. It is also used by Azure SQL (TDS), SQL Server Express.

Is it safe to open port 1433?

Not to the public internet. Internet-facing SQL Server is constantly brute-forced, especially against the sa account. A successful login gives access to the data and, if xp_cmdshell is enabled, to the operating system. Databases should sit behind the application, not on the internet.

Is port 1433 TCP or UDP?

Microsoft SQL Server uses TCP on port 1433.

How do I check if port 1433 is open?

On the server, run sudo ss -tulpn | grep ':1433 ' (Linux) or Get-NetTCPConnection -LocalPort 1433 (Windows) to see what is listening. From another machine, run nc -zv HOST 1433 or Test-NetConnection HOST -Port 1433.

All ports →

Know the moment a port stops answering.

TCP, HTTP, DNS and SSL checks from six regions, plus server metrics from a one-line agent.