WikiRouter
Menu

When you buy through our links, we may earn a commission. About our links ›

How to Set Up Port Forwarding on Your Router

Short answer: Port forwarding is done in your router's admin page. Give the target device a fixed IP address, find the Port Forwarding or Virtual Server menu, create a rule with the protocol, external port, internal port, and internal IP, then save and test it. Use it for gaming, home servers, or security cameras when you need outside devices to reach one device on your network.

What port forwarding does

Port forwarding is a router setting that sends inbound traffic from the internet to a specific device on your home network. When you run a game server, a security camera system, or a personal web server, outside clients connect to your public address and the router needs to know which internal device should receive the connection. The forwarding rule tells it exactly that.

Without a forwarding rule, most routers drop unsolicited inbound traffic. That is good for security by default, but it also prevents some applications from working. If you need outside access, you create an explicit exception for the port or range the application uses. The idea is covered in more detail in port forwarding explained and NAT types explained.

Before you start: give the device a fixed address

Before creating a rule, give the target device a fixed address. If the device gets a different IP from DHCP later, the forwarding rule will point to the wrong place. Use a DHCP reservation so the router assigns the same address to that device every time. See DHCP reservation vs static IP for the difference.

You also need to know whether you are behind a double NAT. If an ISP gateway sits in front of your router, the forwarding rule may need to be created on both devices, or the gateway may need to be placed in bridge mode. Read about double NAT if this sounds like your setup.

Write down the device's current IP address and its MAC address before you start. The MAC address is often shown in the router's device list, and the DHCP reservation screen will let you tie that address to a fixed IP. Keeping a simple record of which device has which address will make the rest of the setup easier.

Find the port forwarding menu

Open your router's admin page from a browser or the vendor's app, then look for a section named Port Forwarding, Virtual Server, NAT, or Applications and Gaming. Different manufacturers call it different things. The common location is under Advanced Setup or Firewall. You can find this by logging in with the admin credentials printed on the router or set by the vendor.

Some routers offer quick links for common uses such as game consoles or cameras. These presets can fill the port numbers for you, but you still need to select the device that should receive the traffic. If you prefer the full control of a web interface, many routers from ASUS and TP-Link expose the same forwarding settings in nearly the same place. See the best ASUS routers or best TP-Link routers if that matters to you.

Create the forwarding rule

Use the table below as a guide for the fields in a typical forwarding rule.

Fill in the rule and save it. Some routers require you to reboot the router or restart the service after adding a rule. A rule that is still in an added but not applied state will not forward traffic.

Common port forwarding fields
FieldWhat to enter
Service nameA label you will recognize, such as Game Server, Camera 1, or NAS
ProtocolTCP, UDP, or Both. Choose UDP for voice and discovery traffic where possible, TCP for web traffic, or Both if the application asks for it.
External portThe public port that outside clients will use. In many applications this is the same as the internal port.
Internal IPThe fixed address of the device, from your DHCP reservation.
Internal portThe port on the device that should receive the traffic. Use the same value as the external port unless the application expects a different one.

Forwarding for gaming, servers, and cameras

For gaming, create rules for the console or PC that will host the session. The router needs the device's local IP and the port range listed by the game or platform. Many modern routers also support UPnP, which can open ports on demand, but manual forwarding gives you a permanent rule that does not depend on the device asking for it. To decide which approach fits you, read UPnP vs port forwarding.

For a home server or NAS, forward the exact port the service uses and point it at the server's reserved IP. If the server hosts more than one service, create one rule per port or use a range if the router supports it. A router with multi-gig ports can help if the server moves a lot of data. See best routers with multi-gig ports.

For security cameras, each camera or the network video recorder requires a forwarding rule if you want to view it from outside. Cameras often use a separate port for each unit. Give each camera a fixed address and forward only the ports you need. You can also avoid exposing cameras directly by using a VPN to reach them remotely. See VPN on router explained.

Test and troubleshoot

After saving the rule, test it from a network other than the one the device is on. A device on the same LAN can often reach the service even when the rule is wrong, so the test should come from outside or through a mobile data connection.

If the port does not open, check that the internal IP matches the device, the protocol is correct, and the router firewall is not blocking the traffic. Also confirm the ISP is not using carrier-grade NAT, which prevents inbound connections. For step-by-step fixes, see port forwarding not working.

Security and alternatives

Port forwarding is a deliberate hole in your network's default defenses. Every open port is an invitation for outside software to reach that device. Keep that device patched, use strong passwords, and enable WPA3 on the Wi-Fi network. The Wi-Fi Alliance describes WPA3 as providing more robust authentication and protection from password guessing. Security guidance from NIST covers standards, guidelines, best practices, and resources for managing risk, and its Small Business Cybersecurity Corner gathers practical resources that also apply to a home network. See router security basics.

If you only need occasional access, consider a VPN instead of port forwarding. A VPN tunnel lets you reach the device without exposing its ports to the internet. Port forwarding is still useful for public services such as web servers or game servers where remote users will not install a VPN. The trade-off is covered in port forwarding vs VPN.

When you do create a rule, keep the list tidy. Remove rules you no longer use, forward only the smallest port range that works, and never forward a device that does not need outside access. This keeps your router's configuration easy to understand and reduces the chance that an old rule will become a security problem later.

What to pick for your use

If youPickBuying guide
You need reliable inbound connections for gamesA gaming router with flexible NAT controlsBest Gaming Routers in 2026: 15 Picks Compared on Specs
You host a server or NAS and move large filesA router with multi-gig portsBest Routers with Multi-Gig Ports in 2026: 15 Picks Compared
You want a mesh system that forwards ports across multiple nodesA mesh router with app-based forwardingBest Mesh Routers in 2026: 15 Picks Compared on Specs
You prefer advanced web-based router menus for detailed rulesA router with a full admin interfaceBest ASUS Routers in 2026: 15 Picks Compared on Specs
You want predictable forwarding on a budgetA well-documented budget routerBest Routers Under $200 in 2026: 15 Picks Compared on Specs

Questions

Do I need port forwarding for online gaming?

Usually only when you are hosting. Most multiplayer matches use outbound connections, which routers allow by default. Hosting a dedicated server or acting as the host in some peer-to-peer games requires inbound access. A manual forwarding rule gives you a stable way to provide it.

Is port forwarding safe?

Port forwarding exposes a device to the internet. Keep that device updated, use strong credentials, and forward only the ports you need. You can also avoid exposing a service by reaching it through a VPN instead.

What is the difference between port forwarding and UPnP?

UPnP lets devices request their own forwarding rules automatically. Manual port forwarding puts that decision in your hands. If you prefer a smaller attack surface, disable UPnP and forward only what you actually use.

Why is my port forwarding not working?

The most common causes are a wrong internal IP, a mismatched protocol, a double NAT, or an ISP that blocks inbound connections. Confirm the device has a reserved address and that the rule is saved, then test from a network outside your home.

Do I need a static IP from my ISP?

No. Port forwarding works with the public IP your router receives from the ISP. If that address changes, a dynamic DNS service can give you a name that always points to the current address.

What changed

  • : First published.

Sources

Related buying guides