What is Port Forwarding & How To Port Forward Your Router?
Port forwarding configuration allows users from remote networks to connect and communicate to a device in a local network behind a router.
Getting Started With Port Forwarding
A typical home network comprises the internet, router, and IP address. The devices in your home network connect together and to the internet through the router. These devices are not accessible to devices on the internet. Thus, to make them accessible, you will need to open some ports. Port forwarding improves your connection by stabilizing it, making some applications run well and games play better.
To ensure communication from the internet to your devices in your home network that are behind a router, you will need a Network Address Translation (NAT). The NAT operates like a traffic controller and directs the flow of internet traffic through the router so that all the devices behind the router can share one public IP address. Using this feature, the devices in your network can request internet content simultaneously and have it delivered to the right device.
When port forwarding, network administrators set aside a port number for the exclusive use of communication with a service in the private network. This port number is on a specific host, and the external hosts must know the number to communicate. Some ports are for specific standard applications in the computing industry. For instance, Port 80 serves HTTP documents. This means that if you send an HTTP request over a different port, say 100, the web server will not recognize it as it is not listed there.
On the other hand, some ports do not have preassigned uses and can serve different purposes. You can use these ports through either the TCP or UDP, with the TCP being the most commonly used protocol in-home applications. The Bitt Torrent is an exception to this rule, and depending on what it listens, it may expect a request in the TCP or UDP protocol.
Types of Port Forwarding
There are three types of port forwarding as follows:
Local Port Forwarding
This is the most commonly used port forwarding, and it allows a user from a local network to connect to another server. Using this type of port forwarding bypasses the firewalls that block certain web pages. Local port forwarding is useful when receiving mails and connecting your laptop through the SSH tunnel.
Remote Port Forwarding
This port forwarding enables applications from the SSH server side to access services on the SSH client-side. To use this port forwarding, you need to know the address of the destination server and two port numbers. The port numbers are dependent on the application to be used.
Dynamic Port Forwarding
This type of port forwarding uses firewall pinholes to traverse a NAT or firewall. This configuration enables clients to securely connect to a server acting as an intermediary for sending and receiving data to one or more destination servers. To implement this configuration, you will need to set up local applications such as SOCKS and SSH, which are useful in processing data transmissions over the internet.
Why Do You Need To Port Forward?
Browsing the internet does not require port forwarding as your browser contacts a server to start the communications. Since this connection originates from inside your network, your router will allow it without requiring any extra configuration. On the other hand, some applications will require you to intervene and help your router connect to other applications and services. For instance, you will need to forward a port if you want to connect to security cameras. This is because you are connecting these cameras from outside your network.
If you are an online gamer, you will also need to forward ports for a fantastic experience. When you forward ports, you will be able to host multiplayer games online. Hosting games is an advantage as you will experience the least amount of lag than every other player. Also, some games will play better when specific ports are open. These games include Fortnite and Minecraft, among others. Therefore, opening your ports stabilizes your internet, enabling you to play without lags and frequent disconnections.
Also, to host certain servers and have users from the internet connecting to them, you will need to forward some ports since users will be blocked by the router’s firewall from connecting (the system will assume them to be a threat to the network.) Thus, through port forwarding, you will open ports on your router, allowing other users to connect and access your services. Other instances you may need to apply the port forwarding rule include when using the DCC messaging as an IRC client, sharing files with SeaFile or OwnCloud, and peer-to-peer sharing software, among others. Therefore, port forwarding is a necessary configuration to open up your servers to specific users without any distortions.
Things you will need beforehand
For successful port forwarding, you should have the following details beforehand:
- The IP address of your router. An IP address is a special number that identifies devices in your network. This address can be static or dynamic. A static IP address does not change when you reboot your device, in case of a power outage, or if the other device disconnects. On the other hand, a dynamic IP address will change every time in the above scenarios. Thus, for successful port forwarding, you need a static IP address.
- The TCP and UDP port numbers of the game server. These port numbers will vary depending on the game, but each game will define its ports such that you do not need to worry about finding them.
Related: How to Find Your Router IP Address
With the above details, you will follow the steps below to port forward your router:
- Assign a static IP address
- Log in to your router
- Go to the port forwarding section
- Create the port forward entry
- Test whether your ports are forwarded correctly
Assign a Static IP Address
Assigning a static IP address is usually overlooked, yet it can save you lots of frustration when port forwarding. There are two ways you can assign a static IP address, namely:
- Using the Command Prompt
- Using your router DHCP Reservation System
To find the IP address using the Command prompt:
- Click the Start menu, and on the Search tab, type cmd, then press Enter. This action will open the Command Prompt window.
- In the Command Prompt window, type ipconfig/all.
- You will see a list of adapters on the Command Prompt window, and your router’s IP address will appear under the Default Gateway title. You should also note down the IPv4 address, Subnet Mask, Default Gateway, and DNS Servers, as you will need to use them in later stages. To manually assign a static IP address, you will need an available one.
It is advisable to choose an IP address outside your DHCP pool, as finding an available IP address is usually challenging. You will use the IP address you select here in later stages.
Once your IP address is ready, proceed to modify your Ethernet adapter settings. To access these settings, tap the Windows key, type View Network Connections, and press Enter. You will see a list of network connections and should right-click on your Adapter, then Properties. If the Internet Protocol Version 4 is unchecked on this screen, this is the wrong adapter, and you should select a different one.
Enter the IP address, Default Gateway, Subnet Mask, and DNS Server details you noted above, then click OK. This action will change your adapter from DHCP to static, and you can surf the internet to confirm you can still access the internet.
The other alternative to setting a static IP address is using the DHCP reservations feature. To start with, not all routers have this feature, and those that do are advantaged, as this feature gives an excellent option in reserving a static IP address for your home devices. With a DHCP reservation, you can manage all your home IP addresses from one interface and change settings on devices that you may not be able to edit in the real sense. These reservations are ideal for gaming consoles, security cameras, tablets, phones, and home automation, among others.
How to Port Forward Your Router
With a static IP address on your device, you can proceed with port forwarding steps as follows.
- Log in to your router.
- Open your chosen browser and enter the IP address you earlier noted as the Default Gateway, then press Enter. This action will open your router’s login window. You should enter your default username and password if you had not changed them before or your updated credentials to log in. If you cannot remember your credentials, you may need to reset your router, but this should be the last resort.
- Find the port forwarding section. On your router’s home page, navigate to the port forwarding section. Most routers list this section under the Advanced, Network, or LAN. Once on this section, you can enter the necessary details to create a port forward entry.
- Creating a port forward entry will vary depending on your router model. However, to start with, you will create a Service Name to remind you of the reason for this port forward. Next, you will enter the destination IP address of the ports in the appropriate box.
- If you are forwarding a range of ports, you will enter the lowest number in the left Global Port Range and the highest number in the right Global Port Range. However, you will enter this port number in both the left and right Global Port Range boxes if you are forwarding a single port.
- Next, select the protocol, whether TCP, UDP, or Both. If your router supports Both protocols, you will make one entry, hence save on time. However, if it does not, you will need to create two port forward entries.
- Click the Save button and reboot your router to effect the changes. You can then test your ports to see whether they are open.
Is Port Forwarding Safe?
Port forwarding is both safe and risky, but since the benefits outweigh the risk, it is a necessary configuration for maximum internet efficiency. Routers feature a basic firewall that blocks incoming network requests from the internet. This firewall protects your network from malicious access and hacker attempts. When you port forward your router, you open ports, and hackers can access your network. While this holds, it is not always the case, and we cannot dismiss the importance of port forwarding based on this risk since nothing is ever safe online.
With the above risk in mind, it is worth acknowledging that you cannot connect to some game servers or run certain applications without port forwarding. Also, if you have a router with strong security features, it can easily dodge unauthorized access making port forwarding harmless. Alternatively, you can use a Virtual Private Network (VPN) to enhance data security through encryption.
Learn more: Is Port Forwarding Safe?
Other Alternatives to Port Forwarding
Port forwarding tells your router what to do with incoming requests such that your router receives incoming requests and redirects them to a specific device. If you do not want to port forward your router, you can handle incoming requests through the DMZ or UPnP.
The Demilitarized Zone, DMZ, throws incoming requests to a specific device on your local network. A DMZ is useful where your router does not know what to do with the incoming requests as it acts like a garbage disposal for such data. Therefore, a DMZ is a destination for your ports where port forwarding rules are absent. However, DMZ is not the best resort as it opens all requests, posing security threats to your network.
Universal Plug and Play, UPnP functions like port forwarding, but you will need to do it manually. To do this, enable UPnP from your web browser and be sure to use security firewalls to protect your network.