We can easily open a port in windows firewall server 2012/2016. Let’s see, how to open a port in windows server 2012. Why do we need this? we can’t connect to the service until the port is not opened at the server end.
So, we have to open a port to make a connection between the client and server with their services to run the application properly without any problem.
Note: we also need to be sure both machines should be able to ping each other. Once it’s opened you can check it from the client end using the command in cmd. If you get the response means it ‘s opened.
telnet 192,168.2.1 portnumber
How to Open a Firewall Port In Windows Server:
you must have installed the server to whom you’re going to open the port. I have installed windows server 2012 on my machine. So, I will show you on server 2012.
Login to the window server and Open the “Windows firewall with advanced security“.
Once it’s opened and now click on “Inbound Rules” and select the “New Rule“.
When it’s opened. we have to choose “port” and click on “Next“.
Suppose, I have to open the firewall port for the FTP server and the port number is 21. you can choose the protocol and I have opened it for port 21/tcp then click on “Next“.
We’ve to select what action should be performed for this port 21. I’m choosing “Allow the connection” and you can select according to your scenario.
Now it’s deepened on your requirement what you want to choose here.
Give it any name and description then click on Finish.
Port 21 has been opened for the FTP server and it’s listening. you can check the opened port using netstat -ab from the command prompt.