How to Add & Manage Rules in the Windows Firewall with Advanced Security
If you need to create advanced Windows Firewall rules that apply to specific ports, protocols, services and all kinds of advanced criteria, your solution is to use the Windows Firewall with Advanced Security. This tool offers a comprehensive wizard that allows you to create all kinds of custom rules. In this tutorial we will show how to use the Windows Firewall with Advanced Security to create advanced rules and manage existing rules. Let's get started:
How To Create A New Rule For The Windows Firewall
In order to create an advanced rule, you first need to open the Windows Firewall with Advanced Security.
If you want to create a rule that applies to inbound connections, go to the Inbound Rules section. If you want to create a rule that applies to outbound connections, go to the Outbound Rules section.
Then, you can use the Actions panel on the right side of the window and click or tap New Rule.
Another option is to open the Action menu on the top of the window and click or tap New Rule.
The New Rule Wizard is shown. First, you need to select one of the four available types of rules:
- Program - creates rule that controls connections for an app or program.
- Port - creates a rule that controls connections for specific ports and protocols.
- Predefined - creates a rule that applies to specific Windows services and features.
- Custom - creates a rule that combines several different parameters, including programs, protocols, ports and services.
For this example, we created an outbound rule which opened the port 5679 when using the UDP protocol. At this step we had to select Port and press Next.
Once the protocol is selected you should type the ports you want to use for your rule. Check the box that says "Specific local/remote ports" and type the ports that you want to use, separated by comma. When done, press Next.
You are asked to select the action that will be taken for the specified protocol and port(s). You have three options: allow the connection, allow the connection if it is secure (this allows traffic only through secure connections, otherwise traffic is blocked) or block the connection.
Since we wanted to allow network traffic through the UDP protocol, port 5679, we selected "Allow the connection" and pressed Next.
You are asked to select the type of network location the rule applies to: domain, private or public. Select the appropriate network location(s) and press Next. In our case, we want to create this rule for all types of network locations.
In the last window of the wizard, you need to type a name for the rule you are creating and a description. It is best that you type something that describes what the rule is doing. This will help you understand later on what your custom rules are doing and you can find them more easily. When done, click or tap Finish.
If you want to create an inbound rule, first select inbound rule and the start the wizard as shared above. The options displayed are the same as for outbound rules.
How To Manage Existing Rules When Using The Windows Firewall With Advanced Security
To modify an existing rule, you need to go to its category, find it and select it. You can right-click on it to open a contextual menu with several options.
You can also use the Actions panel on the right to access the same options.
To view and edit the properties of a rule, click or tap Properties.
The Properties window is similar to the screenshot below. You will find several tabs with different configuration options that can be customized. Feel free to familiarize yourself with everything that can be configured about a Windows Firewall. When done editing its properties, press OK to apply your changes.
If you want to enable or disable an existing rule, select Enable (after selecting a rule that is disabled) or Disable (after selecting a rule that is enabled). If you want to remove an existing rule, select Delete in the menu with actions.
As you can see from this guide, adding new rules and managing existing rules is not very difficult when you are using the Windows Firewall with Advanced Security. Its wizards are generally friendly and easy to use. If you have any questions or issues on this topic, don't hesitate to ask using the comments form below.