How to Forward Ports on Your Router

Some games and programs only work if you open a specific port

Illustration of a network with three computers and a router

Icons by Dryicons (Router and Network)

You need to open ports on your router for some video games and programs to work properly. Although your router has some ports open by default, most are closed and only usable if you manually open them.

If your online video games, file server, or other networking programs aren’t working, you need to access your router and open the specific ports that the application needs.

What Is Port Forwarding?

All the traffic that passes through your router does so through ports. Every port is like a special pipe made for a specific kind of traffic. When you open a port on a router, it allows a particular data type to move through the router.

The act of opening a port, and choosing a device on the network to forward those requests to, is called port forwarding. You can think of port forwarding like attaching a pipe from the router to the device that needs to use the port—there's a direct line-of-sight between the two that allows data flow.

For example, FTP servers listen for incoming connections on port 21. If you have an FTP server set up that nobody outside your network can connect to, you'd want to open port 21 on the router and forward it to the computer you're using as the server. When you do this, that new, dedicated pipe is used to move files from the server, through the router, and out of the network to the FTP client that's communicating with it.

Illustration of port 21 open on a router
Port 21 Open on a Router.

The same is true for other scenarios like video games that need the internet to communicate with other players, torrent clients that need specific ports open for uploading and sharing files, instant messaging applications that can only send and receive messages through a very specific port, and others.

Absolutely every networking application needs a port to run on, so if a program or application isn’t working when everything else is otherwise set up correctly, you might need to open the port on your router and forward requests to the right device (e.g. a computer, printer, or game console).

Port range forwarding is similar to port forwarding but is for forwarding an entire range of ports. A certain video game might use ports 3478-3480, for example, so instead of typing all three into the router as separate port forwards, you could just forward that whole range to the computer running that game.

Below are two primary steps you need to complete to forward ports on your router. Because every device is different, and because there are so many router variations out there, these steps are not necessarily specific to any one device. If you need additional help, refer to the user manual for the device in question, for example, the user guide for your router.

Give the Device a Static IP Address

The device that will be benefiting from the port forward needs to have a static IP address. This is necessary so that you don’t have to keep changing the port forwarding settings each time it obtains a new IP address.

For example, if your computer will be the one running torrenting software, you’ll want to assign a static IP address to that computer. If your gaming console needs to use a specific range of ports, it will need a static IP address.

There are two ways to do this—from the router and from the computer. If you’re setting up a static IP address for your computer, it’s easier to do it there.

To set up a Windows computer to use a static IP address, you have to fist identify which IP address it's using right now.

Screenshot of the ipconfig /all command in Windows 10
The 'ipconfig /all' Command in Windows 10 Command Prompt.
  1. Open Command Prompt on the computer.

  2. Enter the ipconfig /all command.

  3. Record the following: IPv4 Address, Subnet Mask, Default Gateway, and DNS Servers. If you see more than one IPv4 Address entry, look for the one under a heading like “Ethernet adapter Local Area Connection,” “Ethernet adapter Ethernet” or “Ethernet LAN adapter Wi-Fi.”. You can ignore anything else, like Bluetooth, VMware, VirtualBox, and other non-default entries.

Now, you can use that information to actually set up the static IP address.

Screenshot of a static IP address assignment in Windows 10
Setting up a Static IP Address in Windows 10.
  1. From the Run dialog box (WIN+R), open Network Connections with the ncpa.cpl command.

  2. Right-click or tap-and-hold the connection that’s the same name as the one you identified in Command Prompt. In our example above, we’d choose Ethernet0.

  3. Select Properties from the context menu.

  4. Pick Internet Protocol Version 4 (TCP/IPv4) from the list and click/tap Properties.

  5. Choose the Use the following IP address: option.

  6. Enter all the same details you copied from Command Prompt—the IP address, subnet mask, default gateway, and DNS servers.

  7. Choose OK when you’re done.

If you have several devices on your network that get IP addresses from DHCP, do not reserve the same IP address you found in Command Prompt. For example, if DHCP is set up to serve addresses from a pool between 192.168.1.2 and 192.168.1.20, configure the IP address to use a static IP address that falls outside of that range to avoid address conflicts. You could use 192.168.1.21 or above in this example. If you're not sure what this means, just add 10 or 20 to the last digit in your IP address and use that as the static IP in Windows.

You can also set up your Mac to use a static IP address, as well as Ubuntu and other Linux distributions.

Another option is to use the router to set up a static IP address. You might do this if you need a non-computer device to have an unchanging address (like a gaming console or a printer).

Screenshot of the DHCP server settings on a TP-Link Archer C3150
DHCP Address Reservation Settings (TP-Link Archer C3150).
  1. Locate a "Client List," “DHCP Pool," "DHCP Reservation," or similar section of the settings. The idea is to find a list of devices currently connected to the router. The IP address of the device in question will be listed along with its name. 

  2. There should be a way to reserve one of those IP addresses to tie it with that device so that the router will always use it when the device requests an IP address. You might need to select the IP address from a list or choose "Add" or "Reserve."

The above steps are very generic since static IP address assignment is different for every router, printer, and gaming device. Follow these links for specific instructions on reserving IP addresses on these devices: NETGEAR, Google, Linksys, Xbox One, PlayStation 4, Canon printer, HP printer.

Set up Port Forwarding

Now that you know the device’s IP address and have configured it to stop changing, you can access your router and set up the port forwarding settings.

  1. Log in to your router as admin. This requires you to know the router’s IP address, username, and password. Follow those links if you’re not sure how to do that.

  2. Locate the port forwarding options. They’re different for every router but might be called something like Port Forwarding, Port Triggering, Applications & Gaming, or Port Range Forwarding. They might be buried within other categories of settings like Network, Wireless, or Advanced.

  3. Type the port number or port range that you want to forward. If you’re forwarding just one port, type the same number under both the Internal and External boxes. For port ranges, use the Start and End boxes. Most games and programs will tell you exactly which ports you need to open on the router, but if you don’t know what numbers to type here, PortForward.com has a huge list of common ports.

  4. Pick the protocol, either TCP or UDP. You can also choose both if you need to. This information should also be available from the program or game that explains the port number.

  5. If asked, name the port trigger anything that makes sense to you. If it’s for an FTP program, call it FTP, or Medal of Honor if you need the port open for that game. It doesn’t matter what you name it because it’s just for your own reference.

  6. Type the static IP address you used in Step 9 above.

  7. Enable the port forwarding rule with an Enable or On option. 

Here's an example of what it looks like to forward ports on a Linksys WRT610N:

Screenshot of port forwarding settings on a Linksys WRT610N
Port Forwarding Settings (Linksys WRT610N). ​

Some routers might put you through a port forward setup wizard that makes it easier to configure. For example, the router might first give you a list of devices already using a static IP address and then let you pick the protocol and port number from there.

Here are some other port forwarding instructions that are more specific to these brands of routers: D-Link, NETGEAR, TP-Link, Belkin, Google, Linksys.

More on Open Ports

If forwarding a port on your router doesn’t allow the program or game to work on your computer, you might need to check that the firewall program hasn’t blocked the port, too. The same port needs to be open on the router and your computer in order for the application to use it.

Screenshot showing how to open port 21 in the Windows Firewall in Windows 10
Opening Port 21 in the Windows Firewall (Windows 10).

To see if the Windows Firewall is to blame for blocking a port that you’ve already opened on your router, temporarily disable the firewall and then test the port again. If the port is closed on the firewall, you’ll need to edit some settings to open it.

When you open a port on your router, traffic can now flow in and out of it. This means if you were to scan your network for open ports, you should see everything that’s open from the outside. There are websites and tools build specifically for this.

You might check if a port is open if you want to avoid having to get into your router to check, or maybe you’ve already followed the steps above but the program or game still isn’t working, and you want to check that the port was opened correctly. Another reason is to do the opposite: make sure a port you’ve closed is actually closed.

Screenshot of the NetworkAppers open port check tool
NetworkApper's Open Port Check Tool.

Regardless of what you’re doing it for, there are several places to find a free open port checker. PortChecker.co and NetworkAppers both have online port checkers that can scan your network from the outside, and Advanced Port Scanner and FreePortScanner are useful for scanning other devices within your private network.

Only one port forward can exist for every instance of that port. For example, if you forward port 3389 (used by the Remote Desktop remote access program) to a computer with the IP address 192.168.1.115, that same router can't also forward port 3389 to 192.168.1.120.

In cases like this, the only solution, if possible, is to change the port the program is using, something that might be possible from within the software's settings or through a registry hack. In the RDP example, if you edited the Windows Registry on the 192.168.1.120 computer to force Remote Desktop to use a different port like 3390, you could set up a new port forward for that port and effectively use Remote Desktop on two computers from outside the network.