If your Windows computer acts as a server to other computers on a network, then you may need to block a port for programs that require inbound access. For example, if you do not want any of the users on your network to start an HTTP server on port 80, then you can block port 80. You can block a port in the Windows Firewall using the steps shown below :
- Press the key combination Windows logo key + R to open the Run dialog.
- Type wf.msc in the Run dialog and press Enter. This would open the Windows Firewall with Advanced Secruity window.
- Click on the Inbound Rules in the left side menu in the Windows Firewall window as shown,
- Click on the New Rule… on the right side menu as shown,
- In the New Inbound Rule Wizard, select Port in Rule Type window and click Next,
- In the Protocols and Port window, select TCP or UDP ports. A webserver uses TCP port. Similarly, a bit-torrent client uses TCP port. We would be selecting TCP port in this example. Then click on Specific local ports. Then choose one port like 80, or a range of ports like 80-82 (all ports from 80 to 82). You can separate ports by a comma. The protocol type (TCP or UDP) and the number of port(s) depends on the program you are opening port for. Click Next to continue.
- In the Action window, select Block the connection and click Next,
- In the Profile window, select all options and click Next,
- In the Name window, give a name to the new rule like Web server and click Finish,