How to perform port forwarding on a router and why

Anton P. | June 30, 2020

Port forwarding can seem vague and confusing until one encounters it. This process permits certain web traffic to pass through an internal network from an external source. Your router has an impressive number of ports, critical for directing incoming traffic. However, the specifics of how the router achieves this seem foggy. Hence, we will try to start from the basics of getting to know each step of port forwarding.

First stop: how your router operates

Your router is the gateway to the internet. Thanks to its advanced technology, you can use Wi-Fi instead of stretching long ethernet cables all over your home. These devices operate with a unique IP address (the identifier) to help distinguish between individual routers. This public IP address allows data to flow from one network to another.

Things might get confusing from this point: each internet-connected device also has a private IP address. Why? These internal identifiers allow the router to determine which device requires access to the internet. However, to allow outgoing traffic, the router must replace the private IP address with its unique public identifier. You might have heard of Network Address Translation (NAT), the solution to the ever-growing number of new internet-connected devices. So, where does port forwarding fit into this?

What is port forwarding?

Port forwarding is the procedure of rerouting a request to one IP address and port to another combination of an IP address and port. After that, people outside your home network can connect to the device/server you set up on a private network.

In simpler terms, port forwarding allows people outside your home network to access a device or server. To help you visualize this process, think of a private game server that you launch to play with friends. Your teammates cannot connect to the server unless you perform port forwarding. But how does it work?

All connection requests that reach your router have a port. In the simplest terms, it is a number that allows the device to recognize the packet. So, the port number is another identifier that determines the final destination of requests when they reach a server. Port forwarding on a router permits you to combine a specific port number and an IP address. Hence, all consecutive connections will connect to the internal server associated with that address.

Create a static IP address before port forwarding

Before you start the actual port forwarding, dedicate a static IP address to your device. You can do it by following these guidelines:

  1. Click “Start” and type “cmd” into the default search field. Press “Enter” on your keyboard.
  2. Write “ipconfig /all” in the window that appears in front of you. Click “Enter” again.
  3. Note the information listed under your network connection. This area will include your IP address, Subnet Mask, DNS Servers, and other useful details.
  4. Now, open the “Control Panel” and choose “Network and Internet.”
  5. Find and click “Network and Sharing Center.” You should be able to see “Change adapter settings.” Click on it.
  6. Locate “Local Area Connection” and select “Properties.”
  7. Choose “Internet Protocol Version 4 (TCP/IPv4)” and click on “Properties.”
  8. Select “Use the following IP address.” Now, add 10 to the last number of your public IP address and write it into the “IP address” field.
  9. In other fields, type in the combinations you got at the beginning of this tutorial. Make no changes to them.
  10. Click “OK.”

Now, you can set up port forwarding and dedicate this static IP address to a specific device. In case your IP address changes, you won’t have to update the port forwarding settings.

How to set up port forwarding on a router?

Finally, you can configure your router to feature open ports:

  1. Open a browser window.
  2. Log in to your router. You can do this with the default gateway address, the public IP address of the router.
  3. You will need to authenticate access by providing router credentials. If you have not changed them, you can find them on the router.
  4. Find and open the port forwarding settings panel.
  5. Look at the available port configurations. You can also easily find specific ports by paying attention to port forwarding lists online. Additionally, it is possible to enter a particular port under “Internal” and “External.” If you need multiple ports, you can type in the preferred range under “Start” and “End.”
  6. Select the preferred protocol for packet transmission. You can choose between TCP and UDP, or keep them both.
  7. Enter the static IP address you created.
  8. In some cases, you might need to check “Enable” to make sure that everything works smoothly.
  9. If you want, type a name under “Application” and save the changes.

Of course, port forwarding is not always ideal for your privacy and security. Since anyone can access the available device, you can have unwanted participants. In gaming, there might be times when an unknown player joins your server. If you use port forwarding to access security cameras, unknown viewers can take a peek at them.

Therefore, do not take your cybersecurity lightly. Hackers can compromise your digital privacy even without the influence of port forwarding. A common tactic is to intercept connections, steal data, and gain unauthorized access. A VPN can be the guardian protecting you from all these malicious acts. Be responsible and prevent crooks from getting access to your digital identity.

Anton P.

Anton P.

Former chef and the head of Atlas VPN blog team. He's an experienced cybersecurity expert with a background of technical content writing.



© 2023 Atlas VPN. All rights reserved.