Blog / Networking

Port forwarding explained: how to open a port on your router

24 Nov 2026

Every request to your home reaches your router first. A port forwarding rule decides where it goes next. Illustration, not real traffic.

Port forwarding lets someone on the internet reach a device inside your home network. You need it to host a game server, reach a security camera or home storage from outside, or run a small web server. This guide explains how it works, how to set it up, and why it so often fails.

How port forwarding works

Your home has one public IP address, shared by every device on your network through your router. This sharing is called NAT (network address translation). Devices inside use private addresses such as 192.168.1.20, which cannot be reached directly from the internet.

When a connection arrives at your public address, the router has to decide which device should receive it. By default it blocks unsolicited connections. A port forwarding rule tells it what to do: “send traffic that arrives on port 25565 to the computer at 192.168.1.20”. If you are new to addresses, read Public IP vs static IP first, and Ports explained for what a port is.

How a port forwarding rule works A connection from the internet to port 25565 reaches the router. The router’s rule sends it to one device, the game PC at 192.168.1.20. The other devices on the network are not reachable. Internet connects to port 25565 Your router Public IP: 203.0.113.7 (example) Rule: port 25565 → 192.168.1.20 Phone192.168.1.21 TV192.168.1.22 Game PC192.168.1.20
The router passes traffic for one port to one device. Everything else stays hidden. The addresses are examples.

Before you start

ProgramTypical default portProtocol
Minecraft (Java Edition)25565TCP
Minecraft (Bedrock Edition)19132UDP
Plex Media Server32400TCP
Web server80 (HTTP), 443 (HTTPS)TCP

These are common defaults. Your program may use different ports, so check its settings.

Step by step

  1. Open your router’s settings. Type the router’s address into your browser. It is often 192.168.0.1 or 192.168.1.1, and it is listed as the “default gateway” in ipconfig. The login is often printed on a label on the router. If you still use the default password, change it.
  2. Find the right page. Look for Port forwarding, Virtual server, NAT or Applications & gaming. The name differs between brands.
  3. Create a rule. Enter a name, the external port (or range), the internal IP address of your device, the internal port (usually the same number) and the protocol.
  4. Save or apply. Some routers need a restart.
  5. Test it from outside your network. Find your public address with What is my IP, then use the port checker to see whether the port is open. The program must be running while you test.
Example of a port forwarding rule A router settings form with five fields: name Minecraft server, external port 25565, internal IP address 192.168.1.20, internal port 25565 and protocol TCP, followed by a Save button. Add port forwarding rule NameMinecraft server External port25565 Internal IP address192.168.1.20 Internal port25565 ProtocolTCP Save
A typical rule has these five fields. Your router’s page will look different and may use other names for them.

Port forwarding, UPnP and DMZ

If it does not work

Normal connection compared with carrier-grade NAT Top row: the internet reaches your router, which has its own public address, and then your device. Bottom row: the internet reaches your provider’s shared address, but the connection cannot reach your router, so forwarding rules never receive traffic. Normal: your router has a public address Internet Your routerpublic address Your devicereachable Carrier-grade NAT: your provider shares one address Internet Providershared address Your routerno public address Traffic stops at the provider, so your forwarding rule never receives it.
If your router’s address is not public, port forwarding cannot work.

Keep it safe

Every forwarded port is a door into your network. Reduce the risk:

Alternatives to port forwarding

If forwarding is blocked or too risky, a VPN lets you reach your home network without exposing services. Mesh VPN tools and tunnel or relay services also work behind carrier-grade NAT, because your device makes an outbound connection and nothing has to be opened on the router.

Quick checklist

  1. Give the device a fixed local address.
  2. Run the program and allow it through the device firewall.
  3. Create the rule with the right ports and protocol.
  4. Test from outside with the port checker.
  5. Remove the rule when you no longer need it.

Only test ports on devices and networks that you own or have permission to test.