Network security

How to Set Up Port Forwarding on Your Router (Step by Step)

Port forwarding lets the internet reach one device on your home network — a game server, a camera, a media server. Here is the full setup, router by router, and how to keep it safe.

Cysoro Security TeamPublished · 10 min read
:80 :443 :25565 :3389 Router — port forwarding rules Game server 192.168.1.42 Port 25565 · TCP 25565 → 192.168.1.42 NETWORK SECURITY Portforwarding One rule. One device. Done right.
Quick answer

To set up port forwarding, give the target device a fixed local IP address with a DHCP reservation, log in to your router's admin page, open the port forwarding section, and add a rule with the external port, the internal port, the protocol (TCP, UDP or both) and the device's local IP. Then allow the port in the device's firewall and test the connection from outside your network, using your phone on mobile data.

Key takeaways

  • Port forwarding sends incoming traffic on one port to one device on your network, so a server, camera or game console can be reached from the internet.
  • Always reserve the device's local IP first, or the rule breaks the next time the address changes.
  • Only forward the ports you need, check for carrier-grade NAT first, and delete rules you no longer use.

Your router's job is to keep unsolicited traffic out. That is good for security and bad for anything you want to reach from outside — a Minecraft server, a home camera, a Plex library, a game console. Port forwarding is the controlled exception: one rule that sends traffic on one port to one device.

What is port forwarding?

Port forwarding is a rule on your router that sends incoming connections on one port to one device on your local network. A game server, a camera or an app on that device can then be reached from the internet, while everything else stays behind the router's firewall.

Think of your router as a mail sorter. Your home has one public IP address, and every device inside shares it. When a connection arrives from the internet, the router has to decide which device it is for. Without a rule, it drops the connection, because it never asked for it. A port forwarding rule tells it: traffic on this port goes to that device.

A rule has five parts: a name, the external port (the one people connect to), the internal port (the one the app listens on, usually the same number), the protocol (TCP, UDP or both), and the device's local IP address. Get any of them wrong and the connection fails silently. Norton's beginner's guide to port forwarding walks through the same five parts with screenshots of a router admin page.

When do you need port forwarding?

You need port forwarding when something outside your network has to start a connection to something inside it. The most common cases are hosting a game server, running a home media server such as Plex or Jellyfin, accessing a security camera or home automation system remotely, and improving peer-to-peer connections for gaming or file sharing.

You do not need it for ordinary browsing, streaming or video calls. Those connections start from inside your network, so the router already knows where replies should go. If an app works fine without a rule, do not add one — every open port is a doorway into your network, and an unused doorway is pure risk.

Some services avoid the problem entirely. Many cameras and smart-home systems connect out to a cloud service instead, so you reach them through the vendor's app rather than directly. Check whether your device offers that option before you open a port for it.

Before you start: three checks that save an hour

Three things can make port forwarding impossible no matter how carefully you follow the steps, so check them first. They are the cause of most "port forwarding not working" searches.

Check for carrier-grade NAT

Some internet providers share one public IP address among many customers, a setup called carrier-grade NAT (CGNAT). If your router's WAN address starts with 100.64 to 100.127, or differs from the public address shown by our what is my IP tool, you are behind CGNAT and router port forwarding cannot work. Ask your provider for a public address, or use a VPN service that offers port forwarding instead.

Check for double NAT

If your provider's modem is also a router and you added your own router behind it, you have two layers of NAT. Traffic has to be forwarded through both, so you need a rule on each box — or put the provider's box in bridge mode so only your router does the routing.

ASUS states the requirement plainly: the router needs a public WAN IP, and behind multi-layer NAT, port forwarding will not function properly.

Get the port numbers and protocol from the app

Check the application's own documentation first. You need three facts: the port number or range, the protocol (TCP, UDP or both), and which device runs the app. Common examples are in the table below, but always confirm against the app's current documentation, because ports change between versions.

Use casePortsProtocol
Minecraft Java server25565TCP
Minecraft Bedrock server19132UDP
Plex Media Server32400TCP
PlayStation 5 / PS480, 443, 1935, 3478–3480 (TCP); 3478, 3479, 3658 (UDP)TCP and UDP
Xbox Series X / One80 (TCP); 88, 500, 3544, 4500 (UDP); 3074, 53 (both)TCP and UDP
Remote desktop (RDP)3389TCP
Web server (HTTP / HTTPS)80 / 443TCP

Remote desktop deserves a warning: port 3389 exposed to the internet is one of the most attacked ports in existence. If you need remote access to a PC, use a VPN instead of forwarding RDP directly.

Step 1: Give the device a fixed local IP

A port forwarding rule points at a local IP address, so if the device's address changes, the rule breaks. Give the device a fixed address first, using a DHCP reservation in the router — this pins its current address to it without changing any settings on the device itself.

Log in to your router and find the DHCP or address reservation settings (sometimes called "address reservation" or "fixed IP"). Choose the device from the connected list and reserve its current address. On a PlayStation, for example, go to Settings, then Network, then View Connection Status, write down the IP address, and reserve that address in the router.

The alternative is setting a static IP on the device itself, for example in Windows 11 under Settings, Network and internet, then the connection's Properties, then Edit next to IP settings, switching to Manual and turning on IPv4. A router reservation is simpler and avoids address conflicts, so prefer it when your router offers it.

Port forwarding in five steps 1 Reserve the IP DHCP reservation in the router 2 Log in to router 192.168.1.1 or 192.168.0.1 3 Add the rule port, protocol, device IP 4 Allow firewall let the app listen on that port 5 Test outside phone on mobile data, not Wi-Fi About ten minutes end to end — most of it is finding the right menu. Test from outside your network, or the test proves nothing.
The five steps to a working port forwarding rule. Illustration by Cysoro.

Step 2: Log in to your router

Open your router's address in a browser — usually 192.168.1.1 or 192.168.0.1 — and sign in with the username and password. These details are typically on the router's label or in the manual. If you do not know the router's address, on Windows open Command Prompt, type ipconfig and look at the Default Gateway; on a Mac, look for the address next to Router in network settings.

Common default logins are admin/admin for TP-Link, D-Link, Belkin and Asus, admin/password for Netgear, Xfinity and Spectrum, and admin with the password printed on the router for Verizon. If you still use a default password, change it now — an attacker on your network with the default login owns the router. Our guide to securing your Wi-Fi covers the rest of the router hardening checklist.

Some routers have no web page at all. Mesh systems and provider gateways often keep the setting in the mobile app instead: eero, Google Nest Wifi, Xfinity and Spectrum all manage port forwarding from their apps.

Step 3: Add the forwarding rule

Find the port forwarding page. It goes by several names depending on the brand: Port Forwarding, Virtual Server, NAT Forwarding, or Applications and Gaming. It is usually under Advanced, Firewall or WAN settings. The table below shows where it lives on the most common routers, drawn from WiFi Weekly's router-by-router setup guide.

Router or providerWhere to find it
TP-LinkAdvanced, NAT Forwarding, Virtual Servers. Deco app: More, Advanced, NAT Forwarding, Port Forwarding
Netgear / OrbiAdvanced, Advanced Setup, Port Forwarding / Port Triggering (routerlogin.net)
ASUSAdvanced Settings, WAN, Virtual Server / Port Forwarding
LinksysSecurity, Apps and Gaming, Single Port Forwarding
eeroApp: Settings, Advanced networking, Reservations and port forwarding
Google Nest WifiGoogle Home app: Wifi, Network settings, Advanced Networking, Port management
XfinityXfinity app only: WiFi, View WiFi equipment, Advanced settings, Port forwarding
AT&TFirewall settings (NAT/Gaming) at 192.168.1.254, using the Device Access Code on the label

Add a new rule and fill in the fields: a name you will recognize later (such as "Minecraft" or "Plex"), the device or internal IP you reserved, the external port, the internal port (usually the same number), and the protocol the app specifies. Save the rule. Most routers apply it immediately; a few need a restart.

When choosing port numbers, avoid well-known ports (0–1023) for new applications, and make sure the port is not already in use by another service on the device. A Minecraft server on 25565 is a good example of a high, uncontested port.

Step 4: Allow the port in the device firewall

The router is only half the path. Windows, macOS and Linux firewalls can still block the app even after the router forwards the traffic. When the app first runs, approve the firewall prompt — on Windows, accept the Windows Defender Firewall prompt for private and public networks — or add an inbound allow rule for that app only, not for all traffic on the port.

On a console there is no firewall to configure, which is one reason console port forwarding is simpler. On a PC server, this step is the one most often forgotten, and it produces exactly the same symptom as a broken router rule: nothing connects.

Step 5: Test the connection from outside your network

Start the app so it is actually listening, then test from a device on a different network — your phone on mobile data works. Testing from inside your own Wi-Fi proves nothing, because the traffic never leaves the network. Use an online port checker, or simply try to connect to the service with your public IP address and the port.

If the test fails, work through the troubleshooting list in order: is the app running and listening, is the local IP still the reserved one, is the firewall allowing the app, is the rule saved and enabled, and are you behind CGNAT or double NAT? In our experience the first four cover most failures, and the last two cover most of the rest.

Port forwarding not working? Check in this order 1. Is the app running and listening on the port? 2. Is the device still on the reserved local IP? 3. Is the device firewall allowing the app (not the whole port)? 4. Is the rule saved, enabled, and pointing at the right IP and protocol? 5. Are you behind carrier-grade NAT or double NAT? If yes, no router rule can fix it.
Five checks that solve most port forwarding failures. Illustration by Cysoro.

Is port forwarding safe?

Port forwarding is generally safe if properly configured, but opening ports means data packets can bypass certain firewall restrictions to reach your device, which can expose your network to malware or unauthorized access. The main risks are a larger attack surface for hackers, denial-of-service flooding through the open port, and exposed software flaws on the device behind it.

Keep the risk small with four habits. Forward only the ports you need, and only for as long as you need them. Keep the device's software and your router firmware updated, because an open port in front of unpatched software is the worst combination.

Never forward remote desktop (3389) or database ports directly — use a VPN for remote access. And review your rules every few months, deleting anything you no longer recognize.

Check your router's UPnP page too. UPnP lets devices open ports automatically, and a Trojan posing as a game can open ports the same way a game does. If you see ports you do not recognize, that is a sign something on your network is acting without your knowledge.

In that case, check the device list, disconnect anything unfamiliar, and change the router password. For the network-segmentation side of the same problem, see our guide to VLAN hopping.

Do not forward RDPPort 3389 exposed to the internet is scanned constantly and is a common entry point for ransomware. Use a VPN for remote access to a PC instead of forwarding remote desktop directly.

Port forwarding vs UPnP, port triggering and DMZ

These four features are often confused because they all punch holes in the firewall. Port forwarding is a permanent rule to one fixed device. UPnP is automatic port forwarding: a device asks the router to open a port while it needs it, and the router complies without asking you.

Port triggering opens a port temporarily when a device on your network makes a specific outbound connection, then closes it again. It is more flexible than forwarding but less predictable, and servers that must always be reachable should use forwarding instead. A DMZ host is the extreme option: it sends all unsolicited traffic to one device, which is almost never what you want on a home network.

For most people the right choice is simple: manual port forwarding for a server you run deliberately, UPnP for a console, and nothing at all for everything else.

Common port forwarding mistakes

The most common mistake is skipping the DHCP reservation, so the rule works for a week and then breaks when the router hands the device a new address. The second is testing from inside the network and concluding the rule works, when the test never left the house.

The third is forwarding the wrong protocol — a Minecraft Java server needs TCP on 25565, while Bedrock needs UDP on 19132, and swapping them fails silently. The fourth is forgetting the device firewall. And the fifth is leaving rules in place forever: a port you opened for a game server in 2024 is still open in 2026 unless you removed it.

The bottom line

Port forwarding takes about ten minutes: reserve the device's IP, log in to the router, add the rule with the right port and protocol, allow it in the firewall, and test from outside your network. Most failures come from the checks people skip — CGNAT, double NAT, a changed IP, or a blocked firewall.

Open only what you need, keep the software behind the port updated, and clean up rules you no longer use. Do that, and a forwarded port is a useful doorway rather than a hole in the wall. If you want to check what the internet actually sees, start with our what is my IP tool to confirm your public address before you test.

Frequently asked questions

What is port forwarding in simple terms?

Port forwarding is a rule on your router that sends incoming internet traffic on a specific port to one device inside your home network. Without it, your router drops unsolicited incoming connections. With it, a game server, camera or media server on that device can be reached from outside.

Is port forwarding safe?

It is safe when done carefully, but every open port is a potential attack vector. Only forward the ports a specific application needs, keep the device's software and your router firmware updated, allow the port in the device firewall only for that app, and delete rules you no longer use.

Do I need a static IP address for port forwarding?

Yes, in effect. A port forwarding rule points at a local IP address, so if the device's address changes the rule breaks. The best way is a DHCP reservation in the router, which pins the device's current address to it without changing any settings on the device itself.

Why is port forwarding not working?

The most common causes are carrier-grade NAT from your internet provider, double NAT from two routers in a row, the wrong local IP address, the application not actually running, or the device firewall blocking the port. Check each one in turn, starting with whether your router's WAN address is a public address.

What is the difference between port forwarding and port triggering?

Port forwarding keeps a port open permanently and sends traffic to one fixed device. Port triggering opens a port temporarily when a device on your network makes a specific outbound connection, then closes it again. Triggering is more flexible but less predictable, and most servers need permanent forwarding.

Should I use UPnP instead of manual port forwarding?

UPnP lets devices open the ports they need automatically, which is convenient for consoles and games. The risk is that any software on your network, including malware, can open ports too. For a server you run deliberately, a manual rule is safer; for a console, UPnP is the usual choice.

Does port forwarding cost money?

No. Port forwarding is a free setting on your router. The only cost is indirect: hosting a server can use more of your internet data, and some providers charge for a static public IP address if you need one to escape carrier-grade NAT.

How do I remove port forwarding?

Log in to your router's admin page, open the port forwarding section, find the rule and delete or disable it, then save. Restart the router if the change does not take effect. Removing rules you no longer use is one of the simplest security habits for a home network.

Sources

  1. Norton — How to port forward on your router (beginner's guide)
  2. WiFi Weekly — How to Set Up Port Forwarding on Your Router
  3. WhatIsMyIPNow — What Is Port Forwarding?
  4. Protractor — Port Forwarding on a Router or VPN, Step by Step
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against Norton's port forwarding guide, WiFi Weekly's router-by-router setup guide, and Protractor's step-by-step port forwarding walkthrough.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free