How to Open or Set Custom Port on Windows Server 2022

πŸ’‘ What is a Port?

A Port is a virtual point where network connections start and end. It allows computers to distinguish between different kinds of traffic β€” for example, web browsing (port 80) or remote access (port 22). Sometimes, you need to manually open a port in your firewall to allow certain apps or services to communicate over your network.

Steps to Open a Port in Windows Firewall

Open Firewall from Windows

Search for β€œWindows Defender Firewall” in the Start menu and click to open it.

image

Open Windows Firewall Security Properties

On the left panel, click on β€œAdvanced settings” to open the Windows Firewall with Advanced Security.

image

Check if It's Active/On

Make sure that the Domain, Private, and Public Profiles are all showing β€œWindows Firewall is on”.

image

Inside Inbound Rules, Click on New Rule

In the left sidebar, click on β€œInbound Rules”, then on the right pane, click β€œNew Rule…”.

image

Select Port

In the New Inbound Rule Wizard, choose β€œPort” and click Next.

image

Enter/Specify Port Number

Select either TCP or UDP, then enter the specific port number you want to allow, and click Next.

image

Click on Allow the Connection

Choose β€œAllow the connection” to permit traffic through the specified port, then click Next.

image

Select All and Click Next

Check all three options β€” Domain, Private, Public, and click Next.

image

Enter Name and Description for the Port

Give your rule a Name and optional Description to identify it easily, then click Finish.

image

Open Command Prompt and Check if the Port is Open

Open Command Prompt and use commands like netstat -an or telnet [IP] [port] to verify if the port is open.

image

βœ… 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