How to Set Up Port Forwarding

Follow these steps in order to open a port on your router safely.

  1. Understand how port forwarding works

    Port forwarding tells your router to take incoming requests on a specific external port and hand them off to a specific device and port on your internal network. It's what lets you reach your own computer, a home server, or a security camera directly from outside your home.

  2. Find the internal IP address of your device

    Before you can forward a port, you need to know the local IP address of the device that should receive it. On Windows, run ipconfig in Command Prompt; on Mac, check the Network section of System Settings. It's worth assigning that device a static (or reserved) IP so the address doesn't change later and break the rule.

  3. Find the port forwarding menu in your router's admin page

    Log into your router's admin page (usually a local IP like 192.168.0.1 or 192.168.1.1) and look for a menu labeled Port Forwarding, Virtual Server, or NAT settings β€” naming varies by manufacturer.

  4. Enter the forwarding rule

    Create a rule specifying the external port, internal port, internal IP address, and protocol (TCP, UDP, or both). For example, to reach a home server, you'd typically set the external and internal ports to match and point them at that device's IP.

  5. Know the most common reasons to use it

    Port forwarding typically comes up for running a personal home server, hosting a multiplayer game server, or reaching a security camera or NAS remotely from outside your home network.

  6. Follow basic security precautions

    An open port you no longer need is an open door for attackers, so remove rules once they're no longer necessary and keep only the minimum number of ports open at any time.

When you actually need port forwarding

If you're running something at home β€” a personal server, a security camera, a NAS β€” that you want to reach directly from outside, your router needs to be told which internal device incoming requests for a given port should go to. Without a forwarding rule, unsolicited incoming connections are blocked by default, which is normally exactly what you want for security, but it also means services you're intentionally hosting won't be reachable until you open a path to them.

Weigh security before and after you set it up

Every forwarded port is a small increase in your home network's exposure to the internet, so it's worth pairing the setup with basic hardening: strong, unique passwords on the receiving device, keeping its software updated, and reviewing your router's port forwarding list periodically to remove rules you no longer use.

Frequently Asked Questions

I set up port forwarding but still can't connect from outside β€” why?

This often happens when the internal device's IP address has changed since you created the rule, or when your ISP assigns you a shared or dynamic address instead of a fixed public IP (including carrier-grade NAT). Confirm with your ISP whether you actually have a public IP address.

Is port forwarding dangerous?

Not inherently β€” if you open only the ports you need and remove the rule once you're done, the risk is manageable. Leaving unnecessary ports open for a long time is what actually increases exposure to attackers.