How To Block Ports In Windows?

553 Views
0 rating based on 0 reviews

Have you heard of port forwarding? If not, port forwarding allows external devices such as game console and tablets to access your local network connection and the intranet resources hosted on your local network. In this guide, we’ll be learning how to block ports and create static port forwarding in Windows.

Block ports in Windows

Are you searching for a way to restrict any form of network traffic for TCP/IP port or any particular application? The Windows Firewall will be the key tool to use. Windows Firewall is an integrated system constructed to look through and filter out the inbound and outbound data traffic manually to personalize your computer system's rules to meet your demand. It allows creating rules that will be followed by your computer system as it deals with ports and other types of data.

If you are looking for a method to block a specific port on your Windows machine, here is a rundown or a step-by-step guide to learn how to block ports on a Windows computer system through the Windows Firewall application.

  1. As you open your desktop, click on your search bar and type in the Control panel, a desktop application that is already existing in your system.
    desktop application
  2. Once the Control Panel app is opened, click on "System and Security" from the computer's settings options at hand. Here, you will find and select the "Windows Firewall". In some Window Versions, this is called Windows Defender Firewall.
    System and Security
  3. Choose "Advanced settings" on the left side pane which will lead you to the Advanced Security window.
    the Advanced Security window
  4. Next step, there will be two choices of rules for you to edit: the "Inbound Rules" and "Outbound Rules." For blocking ports, you will be using the Inbound Rules. Inbound Rules mainly manage things that you want to allow an entrance to the computer interface.
    Inbound Rules
  5. After selecting the Inbound Rules option, there should be a display of the Inbound Rules section on the screen to the window's right side. In this section, you can click on the "New Rule" option. Another way to perform this action is by using the right-hand click directly in the Inbound Rules to create a New Rule.
  6. This action will lead you to the "New Inbound Rule Wizard" window. Click on the Rule type and select "Port" to add a rule for a port. Click on Next to continue.
    select Port to add a rule
  7. Under the Protocols and Ports step, choose "TCP" (Transmission Control Protocol) as a large portion of ports fall under this category unless specified that they are under "UDP" (User Diagram Protocol). Select "Specified local ports" and manually type in the port of you choosing to block and click Next again.
    Specified local ports
  8. In the Action portion of the steps, choose "Block the connection" from your choices and click on Next.
  9. In the following section, which is Profile, you can either select all the options available or just tick any of the needed boxes. Make sure to always check on "Public" at all times for the action to be generally implemented.
  10. By the end of the steps, Windows Firewall gives you a choice to name your New Rule. You can also provide an optional description and complete everything by clicking on the Finish button, which should start the configuration of the settings in your computer system.
    Choice to name your New Rule

Final Words

Complete all these steps, and you will be able to block or filter out specific traffic ports on your computer to your liking. Personalizing your inbound and outbound traffic can be beneficial to your network as it can choose to keep only the ports you will need. 

Don't forget to ensure that you double-check your steps and be certain of the rules you make as this can affect your Windows system's performance as a whole. Windows Firewall has more options for you to personalize your system, like how you block ports on Windows in this article, which we hope to help your needs.

Summary: block ports in Windows

  • Find your port number.
  • Open command prompt.
  • Enter the netsh command.
  • Enter the firewall rules.