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 a 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/game, and you won’t be able to carry out certain Internet-based functions of that software. This tutorial will show 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.

Is Port Forwarding Safe?

Before we move onto the key issue of opening up ports on your Windows PC, it’s worth addressing the question of just how safe it is. The short answer is yes, port forwarding is mostly safe, but there are some things you should consider.

Port forwarding is the process by which you forward all traffic going to one of the thousands of digital ports on your operating system to a specified machine or server listening to that port at the other end.

The safety of port forwarding 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.

Set Up Port Forwarding on Windows

First, press the Win key on your keyboard, then type firewall into the Start search menu and click “Windows Defender Firewall.”

In the left pane, click “Advanced settings” to open the Firewall rules window. As port forwarding generally involves inbound traffic (i.e. traffic coming to your PC from a company’s data centres or servers), click “Inbound Rules” in the left pane.

Set Up Port Forwarding Windows 10 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.

To get an idea of how ports work, right-click an entry in the list and click Properties.

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.

Set Up Port Forwarding Windows 10 Rule Properties

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

With most apps, as with the picture 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

Click “New Rule” in the right pane, then in the new window click “Port.” Choose whether the connection will use a TCP or UDP protocol (whichever app is asking for you to port forward should specify the protocol), then choose the ports you want to open.

You can allow “All local ports” or specify which local ports you want to open. You can specify a single port, a range of ports, or choose several ports separated by commas.

Set Up Port Forwarding Windows 10 New Rule Wizard

Click Next, then click “Allow the Connection.” Choose whether the connection should apply on your domain, your private home network, or a public network location (not recommended for security’s sake). On the next screen name the rule.

Once the the rule is created, it’ll join the big Inbound Rules list in the Advanced Security window.

Your new rule will now join your list of inbound rules where you can double-click it to modify it, make it apply only to specific programs and services, and so on.

Set Up Port Forwarding Windows 10 Programs Services

At any point, you can right-click the rule and select “Disable” or “Delete,” too.

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

Image credit: Protected global network the Internet by DepositPhotos

Robert Zak Robert Zak

Content Manager at Make Tech Easier. Enjoys Android, Windows, and tinkering with retro console emulation to breaking point.

One comment

  1. Win10 firewall keeps closed port despite otherwise settings ! OS that i can’t control & does not obey IS A DEAD OS TO ME !!! And Win10 is the worst crap MS ever produced, even Administrator account isn’t administrator account any more, malware can have elevated rights, but admin dont ! U cant delete damn thing and u have to fight OS (group policy security to gain some sort of minimal access if OS let u) Audit in Win is such a mess and console is also piece of non sense crap ! U have to fight damn OS every god damn time ! Now im in serious consideration to use a Linux for Internet (no viruses, no malware etc, and the most important thing Linux does obey user settings) cos Win10 is dead useless piece of non-stop problematic crap ! I have been a Win user since Win98, before that i have use an Atari Computer (never crashed) ! I dont like where MS is going with his OS and Im done fighting it !!! MS is cutting user off the control and newer really fixes nothing !

Leave a Comment

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.