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.
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.
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.
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.
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
Our latest tutorials delivered straight to your inbox