Wi-Fi & home network

How to Open Ports on a Router: Port Forwarding Step by Step

Opening a port tells your router to send incoming traffic straight to one device. Here is how to do it safely, which ports common apps need, and how to test it.

Cysoro Security TeamPublished · 8 min read
Port 25565 → Game server Port 32400 → Plex Port 443 → Web server Router: 192.168.1.1 WI-FI & HOME NETWORK Open portson a router Step by step, done safely.
Quick answer

To open ports on a router, give the target device a fixed local IP address, log in to the router's admin page, open the port forwarding section, and create a rule that sends traffic on an external port and protocol to that device's internal IP and port. Save the rule and test the port from outside your network. Only open ports you need, because each one is a potential way in for attackers.

Key takeaways

  • Port forwarding sends incoming internet traffic on a chosen port to one specific device on your home network.
  • Always fix the device's local IP first with a DHCP reservation, or the rule will point at the wrong device after a reboot.
  • Only open the ports you need, and prefer a VPN for remote access instead of exposing services to the whole internet.

Your game console says your NAT type is strict. Your Minecraft server works at home but nobody outside can join. Your security camera is unreachable when you leave the house. All three problems have the same fix: opening a port on your router, also called port forwarding.

What does it mean to open a port on a router?

Opening a port on a router means telling the router to send incoming internet traffic on a specific port straight to one device on your home network. Without that rule, the router does not know which device should receive an unsolicited connection, so it drops the traffic.

Think of your router as a mail sorter for your house. Every device inside shares one public address, and ports are like apartment numbers: port 80 is the web, port 443 is secure web, and port 25565 is a Minecraft server. Port forwarding writes the apartment number next to a device's name so the sorter delivers the mail to the right door.

Your router already does this automatically for traffic you start yourself, using network address translation. Port forwarding is only needed when someone outside starts the connection, which is why games, servers and remote access need it and ordinary browsing does not.

Why would you open ports?

The most common reason is online gaming. A strict NAT type can cause lag, voice chat problems and trouble joining friends, and forwarding the console's ports usually fixes it. The same applies to peer-to-peer games on a PC.

The second reason is hosting something: a Minecraft or Valheim server, a Plex media server, a personal website, or a home automation hub. The third is remote access: reaching a computer, a NAS or a security camera from outside the house. In each case, the service listens on a known port, and the router needs a rule that points that port at the right device.

Before you open anything, check whether you actually need to. Many modern games and apps use relay servers or UPnP and work without manual rules. If it already works, do not add a rule just in case.

What do you need before you start?

You need three things: the device's local IP address, the port numbers and protocol the app needs, and the router's admin login. Get all three before you touch any settings.

First, give the target device a fixed local IP. The easiest way is a DHCP reservation in the router: find the device in the connected-devices list and reserve its current address so it never changes. Without this, the router may give the device a different address after a reboot and your rule will point at the wrong machine, or at nothing.

Second, find the ports the application needs and whether they use TCP, UDP or both. Check the application's official documentation, not a random forum post: the wrong protocol is one of the most common reasons a rule appears not to work. Common examples are in the table below.

Third, find the router's admin address and password. The address is usually 192.168.1.1 or 192.168.0.1, and you can find it as the default gateway with ipconfig on Windows or in network settings on a Mac. The login is printed on a label on the router or in its manual — and if it is still the factory default, change it before you do anything else.

ServicePortProtocolNotes
Web server (HTTP)80TCPUse HTTPS on 443 instead where possible
Web server (HTTPS)443TCPSecure web traffic
SSH remote access22TCPNever expose without key authentication
Minecraft server25565TCP and UDPDefault Java Edition port
Plex Media Server32400TCPRemote streaming
PlayStation 580, 443, 1935, 3478–3480TCPPlus UDP 3478, 3479, 3658
Xbox Series X80, 3074TCP and UDPPlus UDP 88, 500, 3544, 4500

How do you open ports on a router?

These steps work on most routers, although the exact menu names vary by brand. On TP-Link the setting is often called Virtual Server, on NETGEAR it is under Advanced Setup as Port Forwarding or Port Triggering, and on ASUS it is under WAN settings.

  1. Reserve the device's IP. In the router admin page, open the DHCP or LAN settings, find the device, and reserve its current local address so it stays fixed.
  2. Log in to the router. Type the router's IP address into a browser and sign in with the admin username and password.
  3. Find port forwarding. Look under Advanced, Security, NAT or WAN settings for Port Forwarding, Virtual Server or NAT Forwarding.
  4. Add a new rule. Give it a name, enter the external port or port range, choose TCP, UDP or both, and enter the device's fixed local IP and the internal port, which is usually the same number.
  5. Save and apply. Click Save or Apply. Most routers apply the rule immediately; a few need a reboot.
  6. Test from outside. Check the port from another network, for example with your phone on mobile data, and confirm the service responds.

On mesh systems and ISP gateways the setting may live in a mobile app instead of a web page. Xfinity manages port forwarding in the Xfinity app, and many eero and Google Nest setups do the same. The fields are identical; only the location changes.

How port forwarding moves trafficInternetfriend connects toyour public IP:25565Routerport forward rule:25565 → 192.168.1.50Your serverMinecraft at192.168.1.50:25565Without the rule, the router drops the connection: it has no device to send it to.
Port forwarding is a delivery instruction for incoming traffic. Illustration by Cysoro.

How do you open ports for gaming?

Gaming is the most common reason to forward ports, and consoles make it easy to get the numbers wrong. Use the ports for your console first, then add the ports for the specific game if its documentation lists extra ones.

For a PlayStation 5, start by giving the console a fixed IP through a DHCP reservation, then forward TCP ports 80, 443, 1935 and 3478 through 3480, and UDP ports 3478, 3479 and 3658. For an Xbox Series X, forward TCP port 80, UDP ports 88, 500, 3544 and 4500, and port 3074 for both TCP and UDP.

Before forwarding anything, try enabling UPnP in the router's advanced settings. UPnP lets the console open the ports it needs on demand and close them when it stops playing. It is less secure than manual rules, because any program can request a port, but for a console on a home network it is the option most people should try first.

How do you test that a port is open?

Testing from inside your own network does not prove anything: your router may answer differently to local traffic. Test from outside, using a phone on mobile data or a friend's connection, and try to actually use the service.

First, confirm the service is running and listening on the device itself: a port forward to a service that is not running will always look closed. Then check the device's own firewall: Windows Firewall and macOS both block incoming connections by default, and you may need to allow the application through it.

Finally, check your public IP with our free IP checker and confirm it matches the address the router reports as its WAN address. If they differ, your provider is using CGNAT, and port forwarding on your router cannot work at all: the public address belongs to the provider, not to you.

Is opening ports safe?

Port forwarding is safe when it is limited and deliberate, and risky when it is broad or forgotten. Every open port bypasses the router's firewall for that traffic, so an attacker who finds it can probe the service behind it for weaknesses.

The main risks are an unpatched service with a known vulnerability, a device with a weak or default password, and a port that stays open long after you stopped using it. Attackers scan the whole internet continuously, so an exposed service will be found within hours, not months.

Reduce the risk with four habits: forward only the exact ports the service needs, never forward the router's admin page or remote desktop without a VPN, keep the exposed device updated and protected by a strong unique password, and delete rules you no longer use.

NIST's firewall guidance makes the same point formally: firewall rules should follow a default-deny policy, permitting only traffic the policy expressly allows, as set out in NIST SP 800-41 Rev. 1.

Never expose remote desktop directlyForwarding RDP port 3389 to the internet is one of the most attacked configurations in existence. Use a VPN to reach your home network instead, and connect to the desktop from inside it.
Safer ways to reach your home network1. VPN into your network — safestno ports exposed2. Port triggering — opens only on demandcloses when idle3. UPnP — automatic, but any app can request a portconvenient, less control4. Permanent port forwarding — use only when neededalways open
A VPN is the safest way to reach home; permanent forwarding is the last resort. Illustration by Cysoro.

What if port forwarding does not work?

Work through the causes in order. First, confirm the service is running and listening on the device, and that the device's own firewall allows it. Then check that the router rule points at the device's current local IP, which is why the DHCP reservation matters.

Next, check for double NAT: if you have a second router, a mesh node in router mode, or an ISP gateway in front of your own router, the port forward must exist on every layer, or the outer device must be put in bridge mode.

Then check whether your provider uses CGNAT by comparing the router's WAN address with your public IP: if they differ, ask your provider for a public IP address. Norton's port forwarding guide walks through the same checks with screenshots.

Finally, check whether the provider blocks the port. Some providers block common server ports such as 80, 443 and 25 on residential plans. If yours does, run the service on a high, non-standard external port and forward it to the standard internal port instead. Our guide to securing your Wi-Fi covers the router hardening steps worth doing alongside any port change.

The bottom line

Open ports only when a specific service needs outside access, give the device a fixed IP first, create one precise rule per service, and test it from outside your network. Then review your rules every few months and delete the ones you no longer use.

For remote access to your own computers, a VPN beats port forwarding on safety every time. Check what your connection looks like from the outside with our free IP checker before and after you make the change.

Frequently asked questions

How do I open ports on my router?

Log in to your router's admin page, find the port forwarding section under Advanced or Security settings, and add a rule with the external port, the protocol, and the fixed local IP of the device. Save the rule and test the port from outside your network. Give the device a fixed IP first, or the rule will break when the address changes.

What is port forwarding?

Port forwarding is a router setting that sends incoming internet traffic on a specific port to one device inside your home network. Without it, the router does not know which device should receive an incoming connection, so it drops the traffic.

Is it safe to open ports on a router?

It is safe if you open only the ports you need, for a specific device, and keep the software on that device updated. Every open port is a potential attack vector, so never forward ports to a device with weak passwords or unpatched software, and close rules you no longer use.

What is the difference between port forwarding and UPnP?

Port forwarding is a permanent manual rule you create. UPnP lets devices on your network open ports automatically when they need them and close them afterward. UPnP is more convenient for gaming, but less secure, because any program on your network can open a port without asking you.

Why is my port still closed after forwarding it?

The most common reasons are that the service is not actually running on the device, the device's local firewall is blocking it, the router rule points at the wrong IP, or your internet provider uses CGNAT, which means your router does not have a public IP address at all. Check each one in turn.

Do I need a static IP to forward ports?

Yes, effectively. You need the target device to keep the same local IP address, which you can do with a DHCP reservation in the router or a static IP on the device itself. A DHCP reservation is the easier option and is enough for port forwarding.

Which ports should I open for gaming?

It depends on the console and the game. For a PlayStation 5, the usual ports are TCP 80, 443, 1935 and 3478 to 3480, and UDP 3478, 3479 and 3658. For Xbox, the common ports are TCP 80, UDP 88, 500, 3544 and 4500, and port 3074 for both TCP and UDP. Check your game's documentation for its own ports.

Can I open ports on an ISP-provided router?

Usually yes, but the setting may live in your provider's app instead of a web page. Xfinity manages port forwarding in the Xfinity app, while AT and T gateways put it under Firewall settings at 192.168.1.254. Some providers also use CGNAT, which blocks port forwarding entirely unless you pay for a public IP.

Sources

  1. Norton — How to port forward on your router (beginner's guide)
  2. NordVPN — How to open ports on a router: Step-by-step guide
  3. How-To Geek — How to Port Forward on Your Router
  4. NIST — SP 800-41 Rev. 1, Guidelines on Firewalls and Firewall Policy
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, NordVPN's router guide, How-To Geek's port forwarding walkthrough and NIST SP 800-41 Rev. 1.

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