Open Port on Windows Server 2012 in Firewall
The Windows Firewall automatically configures so that accesss to programs will be allowed. Incase you need to open a specific port manually, This guide is meant for you.
Configure Firewall settings
Open the "Windows Firewall with Advanced Security" and in the "Windows Firewall with Advanced Security on Local Computer" section, click on the Windows Firewall Properties.
Here, confirm that the Firewall state is set to On(recommended) and Inbound connections is set to Block(default). By setting inbound connection to Block state, only firewall rules manually added will be accepted.
Opening an Inbound Port
Click on the "Inbound Rules" under the "Windows Firewall with Advanced Security on Local Computer"
Then on the right hand side, under the Actions tab, click on "New Rule...".
A New Inbound Rule Wizard window appears, choose the Port option as the rule to create and click on next.
Next, Select the type of protocol to apply this rule to (Usually its TCP). Then enter the port number.
You can open several ports at once separated by comma: 80, 443 We can also set a range of ports by using 90-100, this will open all ports between 90 to 100.
Next Select Allow the connection and proceed to next. Check all options for the rule to apply and proceed.
Enter a Name that's specific to the rule being applied and click on Finish.
Confirming that the New Port is Open
Open the Command Prompt on the server and run the following command to list out all the ports open.
netsh firewall show state