Hostwinds Tutorials

Search results for:


Table of Contents


What Is Windows Firewall?
How To Open Firewall Ports In Windows
How To Block A Currently Allowed Port
How To Disable Or Delete Firewall Rule

How To Open Or Block Ports Using Windows Firewall

Tags: Windows,  Firewall 

What Is Windows Firewall?
How To Open Firewall Ports In Windows
How To Block A Currently Allowed Port
How To Disable Or Delete Firewall Rule

By default, Hostwinds does not block any ports on your VPS.  However, this article will discuss the Windows built-in firewall and how to open and close ports. This article is intended for Hostwinds clients who need to open or block a port to their Windows VPS, and we will go over how to do this using this simple-to-follow guide with step-by-step instructions.

What Is Windows Firewall?

Windows Firewall is a built-in system that is designed to filter incoming and outbound traffic.  Traffic coming in and out of your Windows server has ports designed to provide direction past the location where the IP points to (i.e., www.example.com:8080 in the URL will direct the site to port 8080).  For example, you may notice Administrator pop-ups when a program needs access, requiring you to confirm or deny the request.  In this event, the Windows Firewall is not recognizing the IP trying to connect or the IP you are trying to connect to.  By design, Windows Firewall is doing its job by ensuring you are aware of the connection before the connection being made and avoiding potentiality harmful software packages.

Typically Windows Firewall only applies to outside connections and unknown connections.  Therefore, unless manually blocked, connection locally is not filtered.  This means connections to devices like your printer are not blocked.

How To Open Firewall Ports In Windows

Steps are outlined using Windows 10 (Windows 2016 Server). However, steps for other Windows versions should be similar in nature.

Step 1: Open your Control Panel by searching for it in your Windows Search bar.

Step 2:  Select System Security from the available options

Step 3:  Select Windows Defender Firewall

Step 4: Find and select Advanced Settings on the left-hand side

Step 5:  The advanced settings should open now.  You will have two different rules you can edit:

  • Inbound Rules: These rules regulate what comes into your computer
  • Outbound Rules:  These rules regulate what goes out of your computer

Right-hand click on either Inbound Rules or Outbound Rules to create a New Rule

Typically, it is suggested to create the same rule for the opposite Inbound or Outbound option for simplicity and security.

Step 6:  For this guide illustrating how to open and block ports, select the Port option to add a rule for an incoming or outgoing port.

Step 7:  Choose the type of connection to apply, either TCP or UDP.  It's worth noting that the majority of ports will use TCP unless otherwise specified.  Add the port manually in the text box and click "Next" when you have specified this to fit your needs.

Step 8: Now select whether or not the connection allows the connection or blocks the connection.

Step 9:  Select the rules this applies to and that you find necessary.  You can select all the boxes, but generally, you will want to ensure "public" is checked.

Step 10: Some Windows Firewalls will allow you to name the rule and provide a description, which will be the last step.

Your port should now be open immediately after configuration and select Finish.

How To Block A Currently Allowed Port

Step 1:  Find the port or rule you want to block and right-click—select Properties from the available options.

Step 2:  Select the General tab and choose "Block the Connection."  Click Apply when done

.Your Port or Rule should now be blocked, and a red circle (or the equivalent) appear within your Firewall Rules

How To Disable Or Delete Firewall Rule

You can disable or delete firewall rules within your Windows Firewall as well by following these steps.

Step 1: Open your Control Panel by searching for it in your Windows Search bar.

Step 2:  Select System Security from the available options

Step 3:  Select Windows Defender Firewall

Step 4: Find and select Advanced Settings on the leleft-hand side

Step 5:  Select Inbound Rules or Outbound Rules regarding which firewall you wish to disable or delete.  For this guide and to demonstrate this in an example, we selected Inbound Rules. You can choose the rules based on your specific needs and decide what you would like to accomplish.

Step 6: Find the rule you wish to disable or delete by right-clicking and select which you want to do.

Disabling will remove the green chcheckmarkext to the rule you disabled.  Right-clicking and selecting Enable Rule will enable it back.

We do not recommend deleting a firewall rule unless you are confident in what you are doing.  Deleting a firewall rule will permanently delete the rule.

Written by Hostwinds Team  /  August 22, 2018