Port forwarding for PC gaming is one of those settings that sounds more intimidating than it is. In many cases you do not need it at all, because modern games and routers handle connections automatically. But if you host your own server, see a “Strict” or “Moderate” NAT warning, or struggle to join friends’ lobbies, forwarding the right ports can fix it. This guide walks through the process from start to finish: finding your PC’s address, reserving it, creating the rule on your router, allowing it through Windows Firewall, and testing the result.
What Port Forwarding for PC Gaming Does
Your router sits between the internet and your devices, and it blocks unsolicited incoming connections by default. That is good for security, but it can be a problem for games where other players connect directly to you, such as a peer-to-peer match or a dedicated server you run yourself.
Port forwarding tells the router: “when traffic arrives on this port, send it to this specific PC.” Each game or server uses specific port numbers and protocols (TCP, UDP, or both). Those values are set by the publisher, so always use the ones from the game’s official support page. Do not guess, and be wary of old forum lists that may be out of date.
You may not need it if:
- You only join servers hosted by the publisher, since your PC makes the outgoing connection.
- Your router supports UPnP and the game opens ports on its own.
- The game uses relay servers for party and voice features.
Before You Start: Gather What You Need
Have these ready so the router steps go smoothly:
- The list of ports and protocols from the game’s official documentation.
- Your router’s admin address and login. The address is often on a label on the router, commonly 192.168.0.1 or 192.168.1.1.
- The local IP address of your gaming PC.
To find your PC’s local IP on Windows 11, open Settings, go to Network & internet, choose Ethernet or Wi-Fi, and look at the properties of your connection for the IPv4 address. Alternatively, open Command Prompt and run ipconfig, then read the IPv4 Address line and the Default Gateway, which is usually your router’s address.
Step 1: Give Your PC a Fixed Local Address
If your PC’s address changes, the forwarding rule will point at the wrong device. Fix this first with a DHCP reservation.
- Sign in to your router’s admin page.
- Find a section called DHCP, LAN, Address Reservation, or Connected Devices.
- Locate your gaming PC in the list of clients.
- Choose the option to reserve or bind its current IP address to its MAC address.
- Save and, if needed, reconnect the PC.
A reservation is cleaner than setting a static IP inside Windows, because the router stays aware of the assignment and avoids conflicts. If your router lacks the feature, you can set a manual IPv4 address in Windows through the same network properties page, choosing an address outside the router’s DHCP range.
Step 2: Create the Forwarding Rule on the Router
Menu names differ between brands, but the idea is the same everywhere.
- In the router admin page, open Port Forwarding. It may be listed under NAT, Advanced, Gaming, or Virtual Server.
- Click Add or Create new rule.
- Name the rule after the game so you can find it later.
- Enter the external port (or port range) from the game’s documentation. Most routers also ask for the internal port; use the same number unless instructed otherwise.
- Choose the protocol: TCP, UDP, or Both, matching what the publisher lists.
- Enter the reserved local IP address of your gaming PC.
- Save or apply the rule, and reboot the router if prompted.
Add one rule per port or range if your router does not allow lists. Avoid forwarding large unneeded ranges, since each open port increases exposure.
Step 3: Allow the Game Through Windows Firewall
Even with the router set correctly, Windows Defender Firewall can still block incoming traffic. Usually the game’s installer creates an allow rule, but dedicated server tools often do not.
- Press the Windows key, type Windows Defender Firewall with Advanced Security, and open it.
- Select Inbound Rules, then New Rule in the right-hand pane.
- Choose Port and click Next.
- Select TCP or UDP and enter the same port number(s).
- Choose Allow the connection.
- Apply the rule to the profiles you use (Private is usually enough on a home network).
- Give it a name and finish.
Alternatively, allow the program itself: open Settings, go to Privacy & security, Windows Security, Firewall & network protection, then Allow an app through firewall, and tick the game for Private networks.
Step 4: Test That the Ports Are Open
Once the router and firewall are set, confirm the result:
- Start the game or server so it is actively listening on the port. A closed program makes the port appear closed even when the rule is correct.
- Use a reputable online port-check tool and enter the port number. Run it from the same network.
- Ask a friend to try joining your session, which is the most realistic test.
- Check the NAT type reported by the game, platform, or Xbox app, if it shows one.
UDP ports often cannot be verified by simple online scanners, since UDP does not reply the same way TCP does. In that case, a friend connecting is the better proof.
If It Still Does Not Work
Work through these common causes in order:
- Wrong local IP. The PC’s address changed or the rule points to a different device.
- Double NAT. If your provider’s modem-router feeds a second router, ports must be forwarded on both, or the first device placed in bridge mode.
- Carrier-grade NAT (CGNAT). Some providers share one public address among many customers, which makes forwarding impossible. Contact your provider to ask about a public IPv4 address.
- Wrong protocol. TCP and UDP are separate. Make sure the rule matches the publisher’s list.
- Third-party security software. Some antivirus suites include their own firewall that needs its own allow rule.
- Router firmware or ISP restrictions. Check for a firmware update and for provider-level settings in their app or portal.
Security Tips When You Open Ports
Every forwarded port is a door into your network, so keep the list short:
- Forward only ports the game’s publisher documents.
- Remove rules for games you no longer play.
- Keep the game, server software, and Windows updated.
- Change the router’s default admin password and avoid enabling remote administration.
- Prefer UPnP only if you trust the devices on your network, since any program can use it to open ports.
Opening ports will not fix every lag problem. If your issue is stutter or dropped frames rather than connection failures, your hardware may be the limit. Our guide on the best budget gaming PC covers balanced builds, and the article on the best refresh rate for gaming helps match a display to your system. For network-side tuning beyond ports, see our look at DNS servers for gaming.
FAQ
Is port forwarding safe for gaming?
It is reasonably safe when you open only the documented ports for a game you trust, keep software updated, and use a strong router password. The risk grows with every extra port you open.
Do I need port forwarding to play online?
Usually not. Joining servers run by a publisher relies on outgoing connections, which work by default. Forwarding mostly matters for hosting or for peer-to-peer titles with strict NAT issues.
What is the difference between UPnP and manual port forwarding?
UPnP lets programs ask the router to open ports automatically. Manual forwarding is a fixed rule you create yourself. Manual rules give you more control, while UPnP is more convenient but depends on every program on your network behaving.
Why does my router say the port is open but the checker says closed?
The game or server must be running and listening on that port, the Windows firewall must allow it, and your connection must not be behind double NAT or CGNAT. Check each in turn.
Should I use DMZ instead of port forwarding?
A DMZ exposes all ports of a device to the internet and is far less secure. Use specific port rules instead, and treat DMZ only as a short diagnostic step, if at all.






