Configure a Windows Firewall for database port

Kazi Ariful Haq 161 Reputation points
2020-11-14T04:54:34.03+00:00

Hi,

We are using SQL Server 2012, 2016 & 2017 in our production environment. We used default port 1433. Now we want to change the default port 1433 to any non-default port i.e 1455. Do we need to just change the port through SQL Server configuration manager or we need to Configure a Windows Firewall for database port through inbound and outbound rules also?

SQL Server | Other
{count} votes

Answer accepted by question author
  1. Dirk Hondong 876 Reputation points
    2020-11-15T11:37:02.25+00:00

    Ha, good question.
    Never checked it by myself.
    I'd think that the configuration manager does not take care of firewall settings if you change the ports.

    So you need to adjust the inbound rule.
    Regarding the outbound rule: those are always random high ports.
    Example: If I talk with my local SSMS to a SQL Server connected to port 1433 the communication port back to my client is always high range starting at 49xxx

    If you use a stateful firewall then you just need to take care about the inbound ports as far as I know.


1 additional answer

Sort by: Most helpful
  1. AmeliaGu-MSFT 14,011 Reputation points Microsoft External Staff
    2020-11-16T05:48:28.437+00:00

    Hi @Kazi Ariful Haq ,

    In addition, you can use TELNET <servername> <port> in cmd to verify the port.
    If telnet is successful, the result will be a black screen with only the cursor flashing.
    If failed, you need to open the port in the Windows firewall for TCP access. Please refer to this documentation which might help.

    Best Regards,
    Amelia


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    Users always get connection timeout problem when using multi subnet AG via listener. Especially after failover to another subnet
    What can I do if my transaction log is full?--- Hot issues November
    How to convert Profiler trace into a SQL Server table -- Hot issues November

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.