2

I use MS SQL 2017 Express Database server in my Windows 2016 server.

I hope to expose MS SQL 2017 Express Database server to the internet, so I need open 1433 port in firewall.

But I find there are two options, local port and remote port, you can see Iamge 1, what are different?

What option should I set to open 1433 port for public internet?

Image 1 enter image description here

2
  • Buy a good TCP/IP book, and then learn for TCP/UDP communication what is source port and destination port. The "local/remote" port concept of a firewall is derived from there.
    – Lex Li
    Dec 24, 2019 at 2:47
  • "Go buy a book" could work for most questions on stackexchange. Maybe reference a book you know is good? That or giving an overview of the concept could be helpful.
    – K_Rol
    May 18, 2021 at 16:14

1 Answer 1

3

The local port is the port number on the local computer, in this case your Windows 2016 server. The remote port is the port number on the remote computer, in this case the client that is connecting to your SQL server.

In most protocols (including SQL Server) the client uses a randomly chosen port number, so the remote port setting in the firewall rule needs to be configured to the default setting of "All Ports". The local port number in the firewall rule needs to be whatever port number your SQL Server is listening on, in this case port 1433.

(Typically, you would only specify a particular remote port when creating an outbound rule; for example, you would specify remote port 80 if you wanted to create a rule blocking outbound HTTP traffic.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.