This tutorial will guide you through the steps to open ports on the Windows Server firewall. Opening ports is often necessary for allowing specific traffic to reach your server, such as web traffic, FTP, Fivem server, MySQL or other services.
Step 1: Open Windows Defender Firewall with Advanced Security
- Click on the Start button, then search for Windows Defender Firewall with Advanced Security.
- Click on it to open the firewall management console.
Step 2: Create a New Inbound Rule
- In the left-hand pane, click on Inbound Rules.
- In the right-hand pane, click on New Rule... under the Actions menu.
Step 3: Choose Rule Type
- In the "New Inbound Rule Wizard," select Port and click Next.
Step 4: Select Protocol and Ports
- On the "Protocol and Ports" page:
- Select TCP or UDP, depending on the protocol you need to open (for applications like Fivem you need to make both TCP and UDP rules)
- Choose Specific local ports and enter the port number(s) you want to open. For multiple ports, separate them with commas (e.g:
30120, 40120, 3306,
80, 443
). - Click Next.
Step 5: Allow the Connection
- On the "Action" page, select Allow the connection and click Next.
Step 6: Specify Profiles
- On the "Profile" page, select the network profiles where the rule should apply:
- Domain: Applies when your computer is connected to a domain.
- Private: Applies when your computer is connected to a private network (like a home or work network).
- Public: Applies when your computer is connected to a public network (like a coffee shop).
- Check the boxes as needed, and then click Next.
Step 7: Name the Rule
- On the "Name" page, give your rule a name (e.g., "Open Port 80 for HTTP") and a description (optional).
- Click Finish to create the rule.
Step 8: Verify the Rule
- You should now see your new rule in the list of inbound rules.
- To verify, check that the rule is enabled (green checkmark) and ensure the settings match your intended configuration.
Summary
By following these steps, you've successfully opened a port on your Windows Server firewall. This allows specific types of traffic through the firewall, depending on the port(s) you've opened. Make sure to only open ports that are necessary for your services to minimize security risks.