Blocking ports in Windows

Once you have made the decision to block a port on a Windows machine, you need to find a way to do so. Most personal firewalls, including Windows Firewall, support the blocking of ports. You may also block ports if you have access to the admin interface of a router or modem, as many come with options to do that as well.

The benefit of blocking it in the router is that it is blocked for all devices you use on the router level. So, if you'd block it on the machine level, you'd have to do so for any device you use at that point or in the future.

Blocking ports using Windows Firewall

block port windows

The process itself is simple, and should not take long to complete:

  1. Tap on the Windows-key, type Windows Firewall, and select Windows Firewall with Advanced Security from the results.
  2. Click on Inbound Rules when the firewall window opens.
  3. Select New Rule from the Actions pane.
  4. Select Port from the Rule Type listing.
  5. Select TCP or UDP, and specify the ports, or a port range (e.g. 445, or 137-139).
  6. Select block the connection.
  7. Select when the rule applies (leave default if unsure).
  8. Add a name, e.g. Port 445, and a description, (e.g. reason for blocking, and date/time).

Note: It can happen that you run into issues after blocking ports on the machine. Apps may not work properly anymore, or you may not be able to connect to certain resources. If that is the case, the port that you disabled in the firewall may be needed for that. You can undo the blocking of ports at any time in the firewall as well.

Repeat the steps for any other port that you want to be blocked on the Windows server.

  • Blocking ports in Windows, Blocking ports using Windows Firewall
  • 0 Users Found This Useful
Was this answer helpful?