Do you need to use an application, but the port for it isn’t open? In today’s guide, we’ll explain how to open a port on a Windows PC.
Out of the box, each operating system works on a set of parameters that enable you to use it to the fullest without the risk of attacks. It’s the same with Windows. A list of open ports in the firewall allows you to use your browsers, email client, or any other application that works on a network.
For the most part, the operating system comes with a set of open ports by default, allowing most people to use their PCs with no issues. With that said, there are situations where you may need to utilize another port, which the operating system may have closed.
These occurrences usually happen when you need to use a specific program that relies only on a specific port that Windows has closed. Using it without opening the port will fail because the traffic won’t flow through it.
If you find yourself in that situation, this guide is the perfect one for you. We’ll explain how to open ports on your Windows PC.
How Do You Open an Inbound Port on a Windows PC?

The process starts with navigating to the Windows Security menu on your PC. You can do this by navigating to the Settings panel from the start menu and clicking on the gear icon. From there, click on the “Update & Security” button, which takes you to a new menu. From there, you’ll need to navigate to “Windows Security” from the left navigation panel. The next step is to click on “Firewall & network protection,” which will open up a new window.
Once the Windows Security window opens, you’ll need to click on “Advanced Settings” near the bottom of the window. You’ll get a security prompt, and once you approve, you’ll get a new window with the defender settings.
Since we’re talking about an inbound port, you’ll need to select “Inbound Rules” from the left navigation section. In the middle of the window, you’ll see a list of rules that are already active. On the right side of the window, you’ll need to click on “New Rule” and start the process.
A new window will open where you’ll need to set up the rules. The first one is the rule type, and you’ll need to have the option “Port” selected. Next are the protocols and the ports. The available protocol options are TCP or UDP, with TCP being the more common one, so choose the one that best suits your use case scenario. For the second part, you’ll need to select “Specific local ports” and enter the ones you need. In some cases, you may need to have multiple ports or a range, at which point you can divide the port with a comma, and for the range, you’ll need to add a dash.
Next up, we have the action, and since we’re opening a port, you’ll need to have “Allow the connection” enabled. The next step is to assign which networks the rule will apply. If you’re sure about the port and the application, you can have all 3 ticked. Finally, you’ll need to add some description for the rule. The name is mandatory because it will help you find it in the list of rules we mentioned earlier. As for the description, it’s a good way to explain to your future self what the rule is all about.
The process ends with the click of the “Finish” button, and you’re good to go.
How Do You Open an Outbound Port on a Windows PC?
The internet traffic flows both ways, meaning that you may need to open some outbound ports apart from inbound. To avoid repeating the same process, we’ll just review the differences compared to the previous one.
Start the process by heading over to the settings menu until you reach the Windows Defender, which is where the main difference is. Here, you’ll need to select “Outbound Rules” from the left navigation panel instead of inbound ones. From this point on, the process is the same as before.
How Do You Close a Port on a Windows PC?
Let’s say you’re done working on the application that required you to open a port. One option is to leave it open, but that’s not a very good idea regarding security. This is why we recommend closing, and here’s how you can do that.
The process of closing is similar to opening, but there are a few different steps. Like before, first, you’ll need to go into your PC’s settings and get to the Windows Defender window. Now, you should see if the port you want to close is inbound or outbound. Based on that, you’ll need to select which rules you should view from the left navigation panel.
Scroll through the list in the middle and find the rule. Once you click on it, you’ll see a few actions appearing on the right of the window. If you plan on using the port in the future, you can disable the rule and enable it whenever necessary. Alternatively, if you don’t plan on using the rule, you can delete it, and you’ll be done.
Conclusion
Ports are essential to your operating system because they act like channels. Apps use them to direct the traffic and help things run smoothly. A fresh Windows installation comes with a certain port open, ensuring that everything is working as intended. This is fine for most users, but some need to open additional ports, which is where this guide comes into play.
We’ve outlined the entire process and explained how to open ports, inbound and outbound. As a bonus, thanks to this guide, you’ll now know how to close ports as well.
FAQ
Q. When should I open ports on a Windows PC?
Opening ports on a Windows PC seems benign, but you should be careful. Whenever you find yourself in a situation where you need to open ports, it’s essential to trust the application that needs that. This is to ensure that you don’t compromise your security and keep your PC healthy.
Q. What is the difference between inbound and outbound ports?
We mentioned that there are inbound and outbound ports, so what is the difference? The inbound ports are for traffic coming your way, and the outbound ones are for traffic leaving your PC. Essentially, it’s the direction of communication.
Q. What happens if I leave a port open?
While you should be fine in most cases, we don’t recommend leaving additional ports open for no reason. Having more ports open may leave your PC vulnerable to attacks, so once you’re done using a port, make sure to close it just in case. Having ports open doesn’t necessarily mean you’re vulnerable, but keeping your PC safe is important.
Q. How many ports does a Windows PC have?
There are 65,535 ports on your computer, and it’s a specific number for a good reason. TCP is essential to any computer communication, specifying that the ports are 16-bit. In a binary world of 0 and 1, it means that you have 2 combinations for a single bit. Putting the two combinations to the power of 16 gives the number 65,536, including the number 0.
Since that number cannot be assigned as a port for various reasons, we’re deducting 1 from the total number, and we get 65,535.
Q. Can I have more than 65,535 ports on a Windows PC?
There is a way to have more ports, but it’s not in the way that you think. The maximum port number you’ll ever see on a computer is 65,535, and the current structure doesn’t allow for more. Let’s say that you do need more. In this case, running multiple networks on the same computer is the best approach.
You’ll need to have two or more Wi-Fi card networks, meaning you’ll have to double the ports. It’s important to note that the port numbers will be the same for both of them, but you’ll have to double the ports. This is a rare instance; in most cases, the original 65,535 is more than enough.
Q. How many ports can I open?
As far as opening ports is concerned, technically, you can have all of them open if you want to. There is a range of ports that are used for certain applications. Ports from 1 to 1,023 are called system ports. 1,024 to 49,151 are ports that we call registered or user, which is the range most people would be looking at when they need to open additional ports.
The last range is from 49,152 to 65,535, and these are ports that we call dynamic because they aren’t registered and controlled and are usually used as temporary ports.
Q. Can multiple apps use the same port?
Port sharing isn’t something that’s available on most computers. Once an app “takes over” a port, no other app can use that port, so you’re left with several options. You can set up the other app to use another port, and you’ll be good to go. If that’s not an option for you, you’ll need to get creative.
A simple solution is to have two network connections on the same computer and connect each app to a different connection. That way, both can remain on the same port, but there won’t be any interference since they’re connected on different networks.