What Is Port Forwarding and How to Set It Up On Your Router (2024)

If you’re reading this article, congratulations! You’re successfully interacting with another server on the internet using ports 80 and 443, the standard open network ports for web traffic. If these ports were closed on our server, you wouldn’t be able to read this article. Closed ports keep your network (and our server) safe from hackers.

Our web ports might be open, but your home router’s ports shouldn’t be, as this opens a hole for malicious hackers. However, you may need to allow access to your devices over the internet using port forwarding from time to time. To help you learn more about port forwarding, here’s what you’ll need to know.

Table of Contents

    What Is Port Forwarding?

    Port forwarding is a process on local network routers that forwards connection attempts from online devices to specific devices on a local network. This is thanks to the port forwarding rules on your network router that match the connection attempts made to the correct port and IP address of a device on your network.

    A local network may have a single public IP address, but each device on your internal network has its own internal IP. Port forwarding links these outside requests from A (the public IP and external port) to B (the requested port and local IP address of the device on your network).

    To explain why this might be useful, let’s imagine that your home network is a little like a medieval fortress. While you can look out beyond the walls, others can’t look in or breach your defenses—you’re secure from attack.

    Thanks to integrated network firewalls, your network is in the same position. You can access other online services, such as websites or game servers, but other internet users can’t access your devices in return. The drawbridge is raised, as your firewall actively blocks any attempts from outside connections to breach your network.

    There are some situations where this level of protection is undesirable, however. If you want to run a server on your home network (using a Raspberry Pi, for instance), outside connections are necessary.

    This is where port forwarding comes in, as you can forward these outside requests to specific devices without compromising your security.

    For example, let’s assume you’re running a local web server on a device with the internal IP address 192.168.1.12, while your public IP address is 80.80.100.110. Outside requests to port 80 (80.90.100.110:80) would be allowed, thanks to port forwarding rules, with the traffic forwarded to port 80 on 192.168.1.12.

    To do this, you’ll need to configure your network to allow port forwarding, then create the appropriate port forwarding rules in your network router. You may also need to configure other firewalls on your network, including the Windows firewall, to allow the traffic.

    Why You Should Avoid UPnP (Automatic Port Forwarding)

    Setting up port forwarding on your local network isn’t difficult for advanced users, but it can create all types of difficulties for novices. To help overcome this issue, network device manufacturers created an automated system for port forwarding called UPnP (or Universal Plug and Play).

    The idea behind UPnP was (and is) to allow internet-based apps and devices to create port forwarding rules on your router automatically to allow outside traffic. For instance, UPnP may automatically open ports and forward traffic for a device running a game server without the need to manually configure access in your router settings.

    The concept is brilliant, but sadly, the execution is flawed—if not extremely dangerous. UPnP is a malware’s dream, as it automatically assumes that any apps or services running on your network are safe. The UPnP hacks website reveals the number of insecurities that, even today, are readily included with network routers.

    From a security point of view, it’s best to err on the side of caution. Rather than risk your network security, avoid using UPnP for automatic port forwarding (and, where possible, disable it entirely). Instead, you should only create manual port forwarding rules for apps and services that you trust and that have no known vulnerabilities.

    How to Set Up Port Forwarding on Your Network

    If you’re avoiding UPnP and want to set up port forwarding manually, you can usually do so from your router’s web administration page. If you’re unsure how to access this, you can usually find the information on the bottom of your router or included within your router’s documentation manual.

    You can connect to your router’s admin page using the default gateway address for your router. This is typically 192.168.0.1 or a similar variation—type this address into your web browser’s address bar. You’ll also need to authenticate using the username and password supplied with your router (e.g. admin).

    Configuring Static IP Addresses Using DHCP Reservation

    Most local networks use dynamic IP allocation to assign temporary IP addresses to devices that connect. After a certain time, the IP address is renewed. These temporary IP addresses may be recycled and used elsewhere, and your device may have a different local IP address assigned to it.

    However, port forwarding requires that the IP address used for any local devices remain the same. You can assign a static IP address manually, but most network routers allow you to assign a static IP address allocation to certain devices in your router’s settings page using DHCP reservation.

    Unfortunately, each router manufacturer is different, and the steps shown in screenshots below (made using a TP-Link router) may not match your router. If that’s the case, you may need to look through your router’s documentation for more support.

    To begin, access your network router’s web administration page using your web browser and authenticate using the router’s administrator username and password. Once you’ve signed in, access your router’s DHCP settings area.

    You may be able to scan for local devices already connected (to autofill the required allocation rule) or you may need to provide the specific MAC address for the device you wish to assign a static IP to. Create the rule using the correct MAC address and the IP address you wish to use, then save the entry.

    Creating a New Port Forwarding Rule

    If your device has a static IP (set manually or reserved in your DHCP allocation settings), you can move to create the port forwarding rule. The terms for this can vary. For instance, some TP-Link routers refer to this feature as Virtual Servers, while Cisco routers refer to it by the standard name (Port Forwarding).

    In the correct menu on your router’s web administration page, create a new port forwarding rule. The rule will require the external port (or port range) that you wish outside users to connect to. This port is linked to your public IP address (e.g. port 80 for public IP 80.80.30.10).

    You’ll also need to determine the internal port that you wish to forward the traffic from the external port to. This could be the same port or an alternative port (to hide the traffic’s purpose). You’ll also need to provide the static IP address for your local device (e.g. 192.168.0.10) and the port protocol in use (e.g. TCP or UDP).

    Depending on your router, you may be able to select a service type to automatically fill the required rule data (e.g. HTTP for port 80 or HTTPS for port 443). Once you’ve configured the rule, save it to apply the change.

    Additional Steps

    Your network router should automatically apply the change to your firewall rules. Any outside connection attempts made to the opened port should be forwarded to the internal device using the rule you created, although you may need to create extra rules for services that use several ports or port ranges.

    If you’re having trouble, you may also need to consider adding extra firewall rules to your PC or Mac’s software firewall (including Windows Firewall) to allow the traffic through. Windows Firewall won’t usually allow outside connections, for instance, so you may need to configure this in the Windows Settings menu.

    If Windows Firewall is causing you difficulty, you can disable it temporarily to investigate. Due to the security risks, however, we’d recommend that you re-enable Windows Firewall after you troubleshoot the issue as it provides added protection against possible hacking attempts.

    Securing Your Home Network

    You’ve learned how to set up port forwarding, but don’t forget the risks. Each port you open adds another hole past your router’s firewall that port scanning tools can find and abuse. If you need to open ports for certain apps or services, make sure you limit them to individual ports, rather than huge port ranges that could be breached.

    If you’re worried about your home network, you can boost your network security by adding a third-party firewall. This could be a software firewall installed on your PC or Mac or a 24/7 hardware firewall like the Firewalla Gold, attached to your network router to protect all of your devices at once.

    What Is Port Forwarding and How to Set It Up On Your Router (2024)

    FAQs

    What Is Port Forwarding and How to Set It Up On Your Router? ›

    Port forwarding is useful whenever you need to make a direct connection between a device in your home network and a remote device. For example: Watch a security camera or baby monitor when you're away from home. Connect to your home server remotely.

    How to setup port forwarding on router? ›

    How to open ports on a router
    1. Access your router's web interface. Navigate to your router's configuration page by typing the router's IP address into your browser.
    2. Log in to your router. ...
    3. Find the port forwarding section. ...
    4. Add a new port forwarding rule. ...
    5. Save the changes.
    Jun 19, 2023

    Should I enable port forwarding on my router? ›

    Port forwarding is useful whenever you need to make a direct connection between a device in your home network and a remote device. For example: Watch a security camera or baby monitor when you're away from home. Connect to your home server remotely.

    What happens when you port forward your router? ›

    What is Port Forwarding? Port forwarding is a way of making your router use a specific port to communicate with certain devices. By setting a specific port for your devices, you are telling your router to always accept requests for those ports and forward data to a device's private IP address.

    How do I assign a port to my router? ›

    Opening TCP/UDP port
    1. Locate your router's IP address.
    2. Head over to your router's settings.
    3. Enter your credentials (username and password).
    4. Look around for the Port Forwarding tab.
    5. Open your preferred port—for example, type 8080 to open port 8080.
    6. Save your settings.
    Jan 14, 2021

    How do I know if my router has port forwarding? ›

    We recommend using a reliable port forward tool like www.portchecktool.com. The port forward checker tool is a valuable resource for network troubleshooting. It helps you check whether your ISP (Internet Service Provider) is blocking specific ports, such as the commonly restricted HTTP port 80 and SMTP port 25.

    Do I need to restart my router for port forwarding to work? ›

    Yes, it is recommended to restart your router after setting up port forwarding. This will ensure that the changes take effect and the forwarded ports are properly opened. Without restarting, the ports may not be accessible and the forwarding will not work as intended.

    What are the cons of port forwarding? ›

    Port forwarding might allow malware to enter your network, as attackers can exploit open ports to gain access and infect your devices. Malware can infect a device through an open port and spread to other devices on the network, potentially causing significant damage.

    Does port forwarding help WIFI? ›

    When enabled, port forwarding (IPv4) and port opening (IPv6) allow traffic from the internet to pass through the Google Nest Wifi firewall or Google Wifi firewall to a specific device on your home network.

    What is port forwarding for dummies? ›

    Also called "port mapping," port forwarding is directing traffic from the outside world to the appropriate server inside a local TCP/IP network. Internet services are identified by a standard port number; for example, Web traffic uses port number 80.

    Can port forwarding cause Internet problems? ›

    When your network is working hard to send and/or receive data through port forwarding, it can result in a traffic jam. This will result in slow internet speeds, slow load page times, and interrupted internet connections.

    What is an example of port forwarding? ›

    Local Port Forwarding

    For example, suppose a user wants to access a web server (port 80) located on a remote server with IP address 192.168. 1.100, but direct access to port 80 is blocked. The user can use local port forwarding to redirect local port 8080 to the remote server's port 80.

    Can you port forward with just a modem? ›

    If the modem is just a modem and not a modem/router combo, then the router will be assigned the public IP thus any port forwarded from it to a network device should be easily reachable remotely. Even if you're modem is actually a modem/router combo you can still forward the port from the combo to the ...

    Which port do I use on router? ›

    Either way, the ports used to connect computers within your network are typically labeled LAN, since they are for devices on your home or business network. The port that connects the router to the outside world is usually labeled WAN, since it connects to a wider network, almost always the internet.

    How do I check if my port forwarding is working? ›

    To check whether port forwarding is working, you must access the router's WAN interface from the Internet. Port forwarding will not work when accessing from the local network. 3. The service or application to which port forwarding is performed must be started so that the port can be seen as 'open' during the check.

    Which port is my router on? ›

    All you have to do is type “netstat -a” on Command Prompt and hit the Enter button. This will populate a list of your active TCP connections. The port numbers will be shown after the IP address and the two are separated by a colon.

    Why is my router not port forwarding? ›

    The first step in troubleshooting port forwarding issues is to check your router settings. Make sure that the port you're trying to forward is not already in use by another device or service. You should also check that the correct protocol (TCP or UDP) is being used and that the forwarding rule is correctly configured.

    Can you port forward on wifi? ›

    In most cases, port forwarding (for IPv4) and port opening (for IPv6) are configured automatically between your Wifi devices and your connected devices using UPnP.

    Does the router need a static IP for port forwarding? ›

    What generally happens is that the IP address your computer gives you will change, so one day you have an IP of 192.168. 1.100, and the next it might be 192.68. 1.101. Any port forwarding configuration you make on your router needs to be fixed to a certain IP address, so it's important that it doesn't change.

    How do I find my port forwarding address? ›

    How to find your IPv4 address for port forwarding
    1. Press the Windows key. ...
    2. Type CMD and press Enter. ...
    3. Type ipconfig and press Enter. ...
    4. Scroll down to the Wireless LAN adapter Wi-Fi section. ...
    5. Look at the IPv4 address line followed by a bunch of dots.
    Apr 11, 2022

    Top Articles
    Latest Posts
    Article information

    Author: Corie Satterfield

    Last Updated:

    Views: 5778

    Rating: 4.1 / 5 (42 voted)

    Reviews: 81% of readers found this page helpful

    Author information

    Name: Corie Satterfield

    Birthday: 1992-08-19

    Address: 850 Benjamin Bridge, Dickinsonchester, CO 68572-0542

    Phone: +26813599986666

    Job: Sales Manager

    Hobby: Table tennis, Soapmaking, Flower arranging, amateur radio, Rock climbing, scrapbook, Horseback riding

    Introduction: My name is Corie Satterfield, I am a fancy, perfect, spotless, quaint, fantastic, funny, lucky person who loves writing and wants to share my knowledge and understanding with you.