How to Allow/Open or Set custome Port on Windows Server 2025 in Firewall
Let’s explain first, what is a port. A port is a virtual point on a system where network connections begin or end. It acts like a doorway that allows data to enter or leave your system. Every time your system connects to the internet or a local network, it uses ports to talk to different services.
For example, when you open a website, your system uses a specific port to send and receive data for that website.
Each type of service uses a specific port number so your system knows where to send the data. For example:
-
Port 80 is used for normal websites (HTTP).
-
Port 443 is used for secure websites (HTTPS).
- Port 22 is used for secure remote access (SSH).
Ports help organize and manage network traffic, so multiple services can run on the same device without interfering with each other.
Ports work with two main communication protocols: TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
-
TCP ports are used when a reliable connection is needed — like web browsing (port 80) or email, where data must arrive in order and without loss.
- UDP ports are used for faster communication, where speed is more important than reliability — like online gaming, video streaming, or voice calls.
On Windows Server 2025, Windows Defender Firewall is configured to allow access to known programs by default. To manually open a specific port, follow the step-by-step guide below.
Steps to Open/Allow a Port in Windows Firewall:
Open Firewall from Windows
Click on the Start menu, search for Windows Defender Firewall with Advanced Security and click to open the application.
Check if Firewall Is Enabled
In the left pane, click on Windows Defender Firewall with Advanced Security and then Windows Defender Firewall Properties.
A new window will open showing the firewall status for Domain, Private, and Public profiles , and check if It's Active/On
Make sure that the Domain, Private, and Public Profiles are all showing “Windows Firewall is on”.
If Firewall is ON: You need to add an inbound rule to allow traffic through the port.
If Firewall is OFF: Technically, ports are not blocked, but it's still a good practice to create the rule so it's ready if the firewall is turned on later.
Allow a Port (Inbound Rule)
In the left sidebar, click on “Inbound Rules”, then on the right panel, click “New Rule…”.
In the New Inbound Rule Wizard, choose “Port” and click Next.
Choose the protocol: Select either TCP or UDP (depending on your application).
Then enter the specific port number you want to allow, and click Next.
Choose “Allow the connection” to permit traffic through the specified port, then click Next.
Check all three options — Domain, Private, Public, and click Next.
Give your rule a Name and optional Description to identify it easily, then click Finish.
Verify if the Port Is Open via Command Prompt
Open Command Prompt and use commands like netstat -an
or telnet [IP] [port]
to verify if the port is open.
Create Outbound Rule
If the app needs to send traffic out through the same port:
Click Outbound Rules in the left panel.
Repeat the same steps as above to allow the port for outgoing connections.
Conclusion
Opening a port in Windows Firewall allows applications or services to communicate with your device over the network. Always double-check that the port is open only when necessary and close it when it's no longer in use to maintain system security.
CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME
for 10% off!
1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month
Available Locations: LAX | MIA | ATL | FRA | AMS