Skip to content

Dedicated Server: Managing Windows Defender Firewall Rules

Discover how to effectively manage Windows Defender Firewall rules and optimize port forwarding for secure server communication → Learn more now

12 November 20263 min read23 Views0 helpful

Introduction

Windows OS includes its own Windows Defender Firewall that controls incoming and outgoing traffic between your server and the internet. This guide shows you how to manage firewall rules and provides general tips for port forwarding.

Accessing Windows Defender Firewall

Windows OS features the Windows Defender Firewall with Advanced Security as a core system application, allowing you to easily manage firewall rules in one place.

You can access it by searching for it in the Windows search bar or by pressing the Windows key and searching in the Start menu.

Managing Rules

Most applications and processes, especially those that need to be reachable over the internet like game servers or web servers, require port forwarding so clients can communicate with your server (the host).

Info

By default, Windows only opens the firewall for applications that need it and keeps all other ports closed. This prevents unnecessary port exposure and reduces risks. That’s why you often see UAC prompts the first time you start a game, to confirm a new firewall rule.

In Windows, you can manage rules in two simple ways: either create rules for programs or create rules that cover entire ports (thus allowing all programs or processes using that port).

There are two types of rules:

  • Inbound Rule: Controls incoming communication (from the internet to your server).
  • Outbound Rule: Controls outgoing communication (from your server to the internet).

Usually, when forwarding ports, you need to create both types of rules to allow communication with clients. However, this depends on your specific setup.

Program Rules

Creating a program rule is usually the recommended choice because it restricts communication to a specific program or process—in contrast to a port rule, which allows any application to communicate on that port.

You will now create two program rules: one outbound and one inbound, both allowing connections.

The example below sets up only the inbound rule. The steps are the same, so you should repeat them for the outbound rule.

Right-click on Inbound Rules in the sidebar and select New Rule....

Select the rule type Program in the first step.

Now select the program for which you want to create the forwarding rule using the Browse button. In the example, the Mozilla Firefox browser was chosen as the example app.

In the action section, select Allow the connection.

In the profile section, leave all options checked and proceed to the last step. Here you should give the rule a meaningful name so you can recognize it later. Optionally, you can add a description.

If everything is correct, click Finish to create the rule.

You have successfully created your own program rule for your Windows server. Now repeat the steps to create an outbound rule under Outbound Rules.

Port Rules

Creating a general port rule can also be useful for many use cases and follows similar steps as before.

You will now create two port rules: one outbound and one inbound, both allowing connections.

The example below sets up only the inbound rule. The steps are the same, so you should repeat them for the outbound rule.

Right-click on Inbound Rules in the sidebar and select New Rule....

Select the rule type Port in the first step.

Now specify the port type (TCP or UDP) and the port number(s) you want to forward. If you want to forward both TCP and UDP, you need to create two separate rules, one for each port type.

In the example, port 25565 (TCP) was used, the default port for Minecraft.

In the action section, select Allow the connection.

In the profile section, leave all options checked and proceed to the last step. Here you should give the rule a meaningful name so you can recognize it later. Optionally, you can add a description.

If everything is correct, click Finish to create the rule.

You have successfully created your own port rule for your Windows server. Now repeat the steps to create an outbound rule under Outbound Rules.

FAQ

Frequently asked questions

Search for Windows Defender Firewall with Advanced Security in the Windows search bar and create a new rule for a program or port under inbound or outbound rules.
Windows only opens the firewall for applications that actually need it and keeps all other ports closed to avoid unnecessary exposure and reduce risks.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.