How to Set Up Port Forwarding in Windows

Set Up Port Forwarding Windows Hero

Every now and then you’ll stumble upon an app or game that requires you to do something called “port forwarding.” Without port forwarding, “inbound” traffic and data coming in from the Internet won’t be able to communicate with the app or game, and you won’t be able to carry out certain Internet-based functions of that software. This tutorial shows you how to set up port forwarding in Windows.

Note: you may also need to set up port forwarding on your router, for which we have a separate guide.

Set Up Port Forwarding on Windows

To forward ports in Windows, follow the instructions below:

  1. Press the Win key on your keyboard, then type firewall into the Start search menu. Click “Windows Defender Firewall with Advanced Security.”
Port Forwarding Open Windows Firewall
  1. As port forwarding generally involves inbound traffic (i.e., traffic coming to your PC from a company’s data centers or servers), click on “Inbound Rules” in the left pane.
Inbound Rules

If you’ve had your PC for a while, you should see a long list of “Rules” in the middle pane, applying to the various apps, services, and software that you allow to deliver traffic to your PC.

  1. To get an idea of how ports work, right-click on an entry in the list, click “Properties,” then open “Protocols and Ports.”
Protocol And Ports

You’ll see the protocol type (usually TCP or UDP, though there are various alternatives) as well as the “Local port” – the port in your firewall that you’re allowing the connection through.

The really important one here is the Remote port, which is the port the client (app or software that’s trying to connect with you) is using to connect.

With most apps, as with the images above, a remote port is randomly assigned by the client, so it just defaults to “All ports” on the Windows firewall.

Create New Port Rules

To create a new port rule, follow these steps:

  1. In the “Windows Defender Firewall with Advanced Security” window, click on “Inbound Rules” in the left sidebar.
Image 21
  1. Click on “New Rule” on the right side of the screen.
Create A New Rule
  1. In the “New Inbound Rule Wizard” window, select “Port,” then tap “Next.”
Select Port To Create A New Rule
  1. Select “TCP” or “UDP” and enter the specific port number you want to forward. You can also select “All local ports” or specify an IP address or a range of addresses you want to forward the port to.
Protocols And Ports Window
  1. Select “Allow the connection” and press “Next.”
Allow The Connection
  1. Choose whether the connection should apply to your domain, your private home network, or a public network location (not recommended for security’s sake), and click “Next.”
Select When The Rule Will Apply
  1. Give the rule a name, such as “Port Forwarding,” and click “Finish.”
Selecting A Name

After completing these steps, the port should be forwarded to Windows, and any traffic that comes in on that port will be directed to the specified IP address.

The new rule will be added to the existing list of inbound rules in the Advanced Security window. From there, you can make modifications to the rule by double-clicking on it. You can also tailor it to apply only to certain programs and services, among other possible changes.

Note that at any point, you can right-click on the rule and select “Disable” or “Delete.”

Tip: now that you know how to set up port forwarding in Windows, you should also make sure these apps are not on your Windows PC, and look at our assessment of Windows Defender and whether it’s good enough to protect your PC.

Frequently Asked Questions

Is Port Forwarding Safe?

Port forwarding is mostly safe, but it is dependent on the security of the server and machine at the other end. If, for example, you’re setting up port forwarding to host an online game, it’s worth quickly checking online whether there are security issues with that game or software.

If you set up, say, an online Minecraft server, then you’ll want to make sure that server’s kept up to date and that you and other users on the server are using firewalls and – ideally – NAT.

The key is to know the software that you’re port forwarding to and that it’s a trusted piece of software.

Can I use port forwarding to improve my Internet speed?

Port forwarding does not directly improve Internet speed. However, it can improve the performance of certain network services, such as online gaming or file sharing, by allowing them to bypass certain network restrictions and firewalls.

What happens if I forward a port that is already being used by another program?

If you forward a port that is already in use, it can cause conflicts and may prevent the other program from functioning properly. It’s important to only forward ports that are not already being used by another program.

Farhad Pashaei
Farhad Pashaei

As a technophile, Farhad has spent the last decade getting hands-on experience with a variety of electronic devices, including smartphones, laptops, accessories, wearables, printers, and so on. When he isn’t writing, you can bet he’s devouring information on products making their market foray, demonstrating his unquenchable thirst for technology.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox