Windows OS includes its own Windows Defender Firewall, which manages incoming and outgoing traffic between your server and the internet. This guide shows you how to manage firewall rules and provides general tips on port forwarding.
Windows Defender Firewall vs. ZapX Network Firewall The Windows Defender Firewall runs directly on your server (operating system level) and is independent from the separate Network Firewall in your ZapX dashboard (under the Network Firewall tab of your VPS), which operates upstream at the network level. If a port remains inaccessible from outside despite a matching Windows Firewall rule, also check the rules and default policies in the Network Firewall tab.
Windows OS includes the Windows Defender Firewall with Advanced Security as a core system application, allowing you to manage firewall rules easily in one place.
You can access it by simply searching for it in the Windows search bar or by pressing the Windows key/icon and using the search in the Start menu.
Most applications and processes, especially those that need to be accessible over the internet like game servers or web servers, require port forwarding so clients can communicate with your server (the host).
By default, Windows only opens the firewall for applications that need it and keeps all other ports closed. This prevents unnecessary port openings and reduces risk. That’s why, for example, you often see UAC prompts when starting a game for the first time 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 ports as a whole (thus covering 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 use case and setup.
Creating a program rule is usually the recommended choice because it restricts communication to a specific program or process instead of opening an entire port that any application could use.
You will now create two program rules: one outbound and one inbound rule, both allowing connections.
The example below shows only the setup of the inbound rule. The steps are identical, so you should repeat them for the outbound rule.
Start by right-clicking on Inbound Rules in the sidebar and selecting New Rule....
In the first step, select Program as the rule type.
Now select the program for which you want to create the forwarding rule by clicking the Browse button. In the example, the Mozilla Firefox browser was chosen as the example application.
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 a meaningful name to recognize the rule 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 process to create an outbound rule by following the same steps under Outbound 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 rule, both allowing connections.
The example below shows only the setup of the inbound rule. The steps are identical, so you should repeat them for the outbound rule.
Start by right-clicking on Inbound Rules in the sidebar and selecting New Rule....
In the first step, select Port as the rule type.
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 as the example port, which is commonly used 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 a meaningful name to recognize the rule 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 process to create an outbound rule by following the same steps under Outbound Rules.