How to Set Up Port Forwarding on Your Router
Set up port forwarding on any router: reserve a fixed IP, add the port rule, test it, and fix common problems such as CGNAT and double NAT.
- Give the device a fixed local IP (DHCP reservation).
- Log in to your router and open Port Forwarding or Virtual Server.
- Add a rule: port, protocol (TCP/UDP) and the device IP.
- Save, then test from outside your network.
I have opened a port on my router for a game server, and the first time felt risky. One wrong number and the service just sits there, silent.
Port forwarding tells your router where to send traffic that arrives on one port. This guide shows you how to set it up and check that it works. To set up port forwarding, add a rule in your router with the port number and the device it should reach.
Before you start
In my experience, this is the part that trips most people up.
- Give the device a fixed local IP. Create a DHCP reservation in your router so the device always keeps the same address, for example 192.168.1.50. Otherwise the forward breaks when the address changes.
- Know the port and protocol. The game, app or device documentation lists the port numbers and whether they use TCP, UDP or both.
- Check for CGNAT. If your router’s WAN IP is different from the IP shown by What Is My IP, or starts with 100.64 to 100.127, your provider uses carrier-grade NAT and port forwarding will not work without their help.
How to set up port forwarding
I have seen this done wrong more than once, so I keep it simple here.
- Log in to your router, for example 192.168.1.1.
- Find Port Forwarding, often under Advanced, NAT, Virtual Server, Firewall or Gaming.
- Add a new rule: give it a name, enter the external port (or range), the internal port, the protocol and the device’s local IP.
- Save or apply the rule, and restart the device if needed.
- Test it from outside your network, for example with mobile data, or with an online port checker.
Where to find it on popular routers
I check this before I change anything else.
| Router | Menu path |
|---|---|
| TP-Link | Advanced, NAT Forwarding, Virtual Servers |
| Netgear | Advanced, Advanced Setup, Port Forwarding / Port Triggering |
| ASUS | WAN, Virtual Server / Port Forwarding |
| Linksys | Security, Apps and Gaming, Single Port Forwarding |
| D-Link | Features, Port Forwarding (or Advanced, Virtual Server) |
| Xfinity | Xfinity app, WiFi, Advanced settings, Port forwarding |
| Google Nest Wifi | Google Home app, Wi-Fi, Advanced networking, Port management |
Port forwarding vs UPnP vs DMZ
I treat this as a quick check, not a deep setting.
- Port forwarding opens only the ports you choose to one device. It is the safest option.
- UPnP lets apps and consoles open ports automatically. Convenient, but any app on the network can open ports.
- DMZ sends all incoming traffic to one device. Avoid it except for short tests.
Common ports
I would rather confirm it now than fix it later.
| Use | Port | Protocol |
|---|---|---|
| Web server | 80, 443 | TCP |
| Remote Desktop (Windows) | 3389 | TCP |
| Minecraft Java server | 25565 | TCP |
| SSH | 22 | TCP |
| FTP | 21 | TCP |
Only open ports you need, and close them when you stop using them. Never expose remote desktop or camera logins with weak passwords.
Port forwarding not working?
I always start with the router page for this.
- Confirm the device IP in the rule matches its current local IP.
- Check the firewall on the device itself (for example Windows Defender Firewall).
- Make sure no other rule uses the same external port.
- If you have a modem router plus your own router (double NAT), forward the port on both, or put the modem in bridge mode.
- Ask your provider whether you are behind CGNAT.
Give the device a fixed address first
In my experience, this is the part that trips most people up.
Port forwarding points a port at one local IP address. If that device gets a different address next week, the rule quietly stops working. That’s the most common reason forwarding “breaks on its own”.
Fix it with a DHCP reservation on your router. Find the device in the connected list, choose reserve or always use this IP, and save. Your console, camera or server will get the same address every time, and your forwarding rule keeps working.
Check that a forwarded port is open
I have seen this done wrong more than once, so I keep it simple here.
- Make sure the app or game on the device is running. A port only shows as open if something is listening.
- Use an online open port checker with your public IP and the port number.
- If it shows closed, check the device’s own firewall, the local IP in the rule, and whether you’re behind double NAT or carrier-grade NAT.










