What ports does SQL Server use on Linux? I want to be sure I'm forwarding the ports required when I run it in a container.
1 Answer
Assuming the defaults, there are two ports SQL Server listens on which can be verified with netstat -ln
,
ms-sql-s
TCP 1433 for the serverms-sql-m
TCP 1434 for the Dedicated Administrator Connection which by default is enabled for local connections on127.0.0.1
only. For more information see "remote admin connections Server Configuration Option"
While my install was only listening for TCP connections, /etc/services
shows entries for UDP too,
ms-sql-s 1433/tcp # Microsoft SQL Server
ms-sql-s 1433/udp
ms-sql-m 1434/tcp # Microsoft SQL Monitor
ms-sql-m 1434/udp
The "Microsoft SQL Monitor" is the DAC connection.
The log also shows similar information,
spid19s Server is listening on [ 'any' <ipv6> 1433].
spid19s Server is listening on [ 'any' <ipv4> 1433].
Server Server is listening on [ ::1 <ipv6> 1434].
Server Server is listening on [ 127.0.0.1 <ipv4> 1434].