New

EmeraldHost 2.0 is here: faster, more intuitive, and made for everyone - the new panel!

Learn more
Guides
WindowsOpen Windows Firewall Ports

How to Open the Windows Firewall on Your Windows Server

Open ports in the Windows Firewall on a Windows Server

2 min read
Jun 14, 2026

For services such as game or web servers to be reachable from the outside, you have to open the required ports in the Windows Firewall. This guide shows you both ways – via the graphical interface and via PowerShell.

Via the graphical interface

  1. Open the firewall
    Press Windows + R, type wf.msc and confirm with Enter. The Windows Defender Firewall with Advanced Security opens.

  2. Create a new inbound rule
    Click Inbound Rules on the left and then New Rule… on the right.

  3. Choose the rule type
    Select Port and click Next.

  4. Specify protocol and port
    Select TCP or UDP and enter the desired port under Specific local ports (e.g. 25565). Click Next.

  5. Allow the connection
    Select Allow the connection and click Next.

  6. Select the profiles
    Leave all profiles (Domain, Private, Public) enabled and click Next.

  7. Name the rule
    Give it a meaningful name (e.g. Minecraft Server) and click Finish.

Via PowerShell

Alternatively, you can open a port directly via PowerShell – which is often faster.

  1. Open PowerShell as administrator
    Right-click the Start menu and select Windows PowerShell (Admin) or Terminal (Admin).

  2. Create the rule
    Run the following command and adjust the name, port and protocol:

    New-NetFirewallRule -DisplayName "Minecraft Server" -Direction Inbound -LocalPort 25565 -Protocol TCP -Action Allow
    

    For a UDP port, replace TCP with UDP.

Written byEmeraldHost Team
Last updated on Jun 14, 2026 Edit on GitHub

Did this article help you?

Your feedback helps us improve our guides.

Help shape the guides

€10.00 in credit for every new guide, €5.00 for every improvement.

Contact Support

Create a support ticket and our team will get back to you as soon as possible – personal and professional.

Go to Support
1257 members online

Discord Community

Connect with other players, get quick help from the community, and stay up to date with the latest news.

Join Discord

Join our Discord community 1257 members online right now