How to open ports in Windows Firewall

When dealing with certain apps and processes on your Windows 10 PC, you might run issues if you aren't connecting properly to the internet. If you've come across a potential fix that involves opening a certain port in your firewall, you might be wondering what exactly that process entails. This is a problem that can arise in plenty of situations, but especially when attempting to set up a VPN. If you suspect Windows Firewall is part of your connectivity issue, here's how to open ports.

How to open a port for incoming traffic in Windows Firewall

Windows Firewall is designed as a security measure for your PC. To put it simply, a firewall analyzes incoming and outgoing connections to determine whether or not they're threats. If you suspect that your Windows Firewall is causing connectivity issues, you can open a port for incoming traffic. Here's how:

  1. Right-click the Start button.
  2. Click Search.
  3. Type Windows Firewall.

  1. Click Windows Firewall.
  2. Click Advanced settings.

  1. Click Inbound Rules in the left frame of the window.
  2. Click New Rule… in the right frame of the window.

  1. Click Port.
  2. Click Next.

  1. Click either TCP or UDP.
  2. Click Specific local ports.

  1. Type a port number. (In this case, we will open port 1707.)
  2. Click Next.

  1. Click Allow the connection.
  2. Click Next.

  1. Click any network types you'd like to allow the connection over.
  2. Click Next.

  1. Type a name for the rule.
  2. Click Finish.

How to open a port for outgoing traffic in Windows Firewall

The same set of steps listed above can be used to create a rule for outgoing traffic. In step No. 6, instead of clicking Inbound Rules, you'll want to click Outgoing Rules. The rest of the steps are the same, and you can disable the rule in the same manner by using the steps in the next section.

How to close a port in Windows Firewall

Want to disable the rule you created to open a port in the Windows Firewall? Here's how:

  1. Right-click the Start button.
  2. Click Search.

  1. Type Windows Firewall.
  2. Click Windows Firewall.

  1. Click Advanced settings.
  2. Click Inbound Rules or Outbound Rules in the left frame of the window, depending on what type of rule you created.

  1. Click the rule you created.
  2. Click the name of the rule in the right frame of the window.

  1. Click Disable Rule.
  2. Click Delete if you want to completely delete the rule.

More resources

Need a bit more help with Windows Firewall and Windows 10? We have plenty of resources covering a wide range of topics.

Cale Hunt
Contributor

Cale Hunt brings to Windows Central more than eight years of experience writing about laptops, PCs, accessories, games, and beyond. If it runs Windows or in some way complements the hardware, there’s a good chance he knows about it, has written about it, or is already busy testing it. 

Latest in Windows 10
Windows 10 Find My Device
How to enable Find My Device on Windows 10 to recover your PC if it's ever lost or stolen
Outlook Client Hero
Microsoft just made Windows 10 worse, and there's (almost) nothing you can do about it
Windows 10 Start menu on HP ZBook Studio G4
Microsoft will retroactively downgrade this part of Windows 10 next month
Former Microsoft Executive Vice President Terry Myerson stands in front of a presentation about Windows 10
Microsoft addresses the 'elephant in the room,' discusses upcoming end of Windows 10 support
Surface Hub 2S
Windows 10 for PCs is not the only version of Windows to reach end of support this year
Windows Insider program settings
Microsoft shuts down the Windows 10 Beta Channel just five months after reopening it
Latest in How-to
Atomfall
Can I play Atomfall on Steam Deck, ROG Ally, and other gaming handhelds?
The First Berserker: Khazan
Is The First Berserker: Khazan on Xbox Game Pass?
Clair Obscur: Expedition 33
Is Clair Obscur: Expedition 33 on Xbox Game Pass?
A close-up of Hazel in South of Midnight
Is South of Midnight on Xbox Game Pass?
Atomfall screenshot
Atomfall: How to grab the best melee weapon and melee perk right away
Atomfall District B
Atomfall: How to open District B, get inside the Robot Facility, and grab the Signal Redirector