How to block and allow port in Windows Server?
Windows firewall is an application provided by Microsoft Windows. This will filter the connections coming to server or system. Using Windows Firewall you can restrict the IP address and ports connecting to your server. Windows firewall will block unsolicited connection on network and increases the level of security of the system.
Follow the below steps to allow or block port using Windows Firewall:
Check whether Windows Firewall running on your server,
Control Panel >> All Control Panel Items >> Windows Firewall
Switch On Windows Firewall if the status is off.
Click on Advanced Settings.
Right Click on Inbound Rule and click on New Rule.
In the Rule Type dialog box, select Port, and then click Next.
In the Protocol and Ports dialog box, select TCP. Select Specific local ports, and then type the port number of the instance of the Database Engine, such as 80, 1443 for the default instance. Click Next.
In the Action dialog box, select Allow the connection OR Block the connection, and then click Next.
check all 3 options for rules to be applied.
In the Name dialog box, type a name and description for this rule, and then click Finish.