If you've ever tried to host a game server, run a security camera app that needs remote access, or get a game console to stop complaining about "strict NAT", you've probably bumped into port forwarding. It sounds technical, but the idea is simple once someone explains it properly.
This guide walks you through what port forwarding actually does, when you genuinely need it, and how to set it up without leaving your network wide open. Expect to spend 15 to 30 minutes on this, depending on how your router's interface is laid out. It's a beginner-friendly task, but the security section matters just as much as the setup steps, so don't skip it.
What You'll Need
- Access to your router's admin settings (usually a web address like 192.168.1.1)
- Your router's admin username and password
- The local IP address of the device you want to forward a port to
- The specific port number your game, server or app requires (check the app's documentation or support page)
- A device you can test the connection from outside your home network, such as a phone on mobile data
Step 1: Understand What Port Forwarding Actually Does
Your router sits between your home devices and the internet, acting a bit like a receptionist. When a request comes in from outside, the router has to decide which device inside your home should get it. By default, it doesn't know, so it just blocks unsolicited traffic.
Port forwarding tells the router: "If a request comes in on this specific port, send it straight to this specific device." Ports are just numbered doors. Different apps use different doors by convention, so forwarding the right one matters.
This is different from your local Wi-Fi network settings, which handle how devices talk to each other inside the house. If you're still getting your head around the basics of your network, it helps to understand how to choose a router and what its settings actually control before changing anything.
Step 2: Work Out Whether You Actually Need It
Port forwarding isn't always necessary, even for things that seem to require it.
- Gaming consoles: Most modern consoles use something called UPnP (Universal Plug and Play) to open ports automatically when needed. If your console shows an "open" or "moderate" NAT type, you probably don't need to do anything manually.
- Game servers you host yourself: If you're running a dedicated server (Minecraft, Valheim, etc.) on your own PC or a home lab box, you'll usually need to forward a specific port so other players can reach it.
- Security cameras and smart home hubs: Many modern systems use cloud relay services instead of port forwarding, which is safer. Check if your device already supports remote access without it.
- Remote access to a home server or NAS: This is the case where port forwarding is most often considered, but it's also the case where the safer alternatives below are usually a better fit.
If you're building out a proper home lab, this decision comes up a lot. It's worth reading home lab for beginners: where to start before you commit to opening ports permanently.
Step 3: Find the Local IP Address of Your Device
Port forwarding only works reliably if the device you're forwarding to has a fixed local IP address. If its address changes (which can happen with DHCP), your port forward will quietly stop working.
- On Windows, open Command Prompt and type
ipconfig, then note the IPv4 address. - On macOS, go to System Settings, then Network, and check the IP address under Wi-Fi or Ethernet.
- On most phones, check the Wi-Fi settings for the connected network and look for the IP address field.
Once you have it, log into your router and look for a setting called "DHCP reservation", "static lease" or "address reservation". This locks that device to the same local IP every time, so your port forward keeps working.
Step 4: Find the Port Number You Need
Check the documentation for whatever you're setting up. Most game servers and self-hosted apps list the exact port (or range of ports) and whether it uses TCP, UDP or both.
Common examples include:
- Minecraft Java server: port 25565, TCP
- Many VPN protocols: port 1194 (OpenVPN) or 51820 (WireGuard), UDP
- Remote desktop: port 3389, TCP
Write the port number and protocol down before you go into your router settings. Getting this wrong is one of the most common reasons port forwarding "doesn't work".
Step 5: Log Into Your Router and Find Port Forwarding Settings
- Open a web browser and type your router's address (often 192.168.1.1 or 192.168.0.1) into the bar.
- Log in with your admin credentials. If you've never changed these, check the sticker on the router itself.
- Look for a section called "Port Forwarding", "Virtual Server", "NAT Forwarding" or something similar. Every router brand names this slightly differently, so check the manual if you can't find it.
If your home uses a mesh Wi-Fi system, port forwarding is usually managed through the main app rather than a web page. Our guide to the best mesh Wi-Fi systems for UK homes covers how a few popular systems handle this differently.
Step 6: Create the Port Forwarding Rule
- Choose "Add new rule" or similar.
- Enter the port number (or range) you noted earlier.
- Select the protocol: TCP, UDP, or both if you're unsure and the documentation says so.
- Enter the local IP address of the device you reserved in Step 3.
- Give the rule a name you'll recognise later, such as "Minecraft server" rather than "Rule 1".
- Save and, if prompted, restart the router.
Some routers ask for an "external port" and "internal port" separately. In most home setups these should match, so if your game needs port 25565, put 25565 in both fields.
Step 7: Test the Port Forward
Testing properly means checking from outside your home network, since devices inside your Wi-Fi often connect fine even when the forward is broken.
- Turn off Wi-Fi on your phone and switch to mobile data.
- Use an online port checking tool and enter the port number you forwarded.
- Make sure the device or server you're testing is actually running at the time.
If the test fails, double-check the local IP address hasn't changed, confirm the correct protocol, and make sure no firewall on the device itself is blocking the connection.
Step 8: Consider Whether a Safer Alternative Fits Better
This is the step a lot of guides skip, and it's arguably the most important one. Every port you forward is a door left open to the internet, permanently, whether you're using it or not. If there's a flaw in the software behind that door, anyone can try to walk through it.
For remote access to things like a home server, NAS, or home lab setup, tools like Tailscale or other VPN-based options are usually a better fit than traditional port forwarding. These work by creating a private, encrypted network between your devices, so nothing is exposed to the public internet at all. You install an app on your home device and on your phone or laptop, and they find each other securely without you opening any ports.
The trade-off is a tiny bit of setup time upfront, but you get:
- No open ports facing the internet
- Encrypted traffic by default
- Easy access from anywhere without remembering port numbers or IP addresses
- Less to maintain long term, since there's no rule to break when your IP changes
If you're running a small home lab on something like a mini PC, this is well worth setting up from day one. Our guide to the best mini PCs for a home lab is a good starting point if you're building this kind of setup from scratch.
Port forwarding still has its place, particularly for game servers where players need a direct, low-latency connection. But for personal remote access, a VPN-based tool is usually safer and just as convenient.
Common Mistakes to Avoid
- Forwarding a port to a device with a changing IP address. Without a DHCP reservation, the forward silently breaks and you'll waste time troubleshooting the wrong thing.
- Leaving old rules active after you stop using them. Go back every few months and remove forwards you no longer need.
- Forwarding a wide range of ports "just in case". Only open what's specifically required; wider ranges mean a bigger attack surface.
- Using default or weak router admin passwords. If someone gets into your router settings, they can create their own forwards without you knowing.
- Assuming port forwarding fixes every connection issue. Sometimes the real problem is your ISP's connection, in which case running accurate broadband speed tests is a better first step than touching router settings.
- Not testing from outside your own network. A forward that seems to work from inside the house can still fail for everyone else.
Conclusion
Port forwarding is a useful tool when you genuinely need it, like running your own game server or a specific self-hosted app that doesn't support anything else. Setting it up properly means fixing the device's local IP address, getting the right port and protocol, and testing from outside your network to confirm it actually works. But for most remote access needs, especially anything involving a home server or personal files, a VPN-based option like Tailscale gives you the same result with far less exposure. Weigh up what you're actually trying to achieve before opening a door that stays open indefinitely.
FAQ
Is port forwarding dangerous?
It's not dangerous by itself, but it does increase your exposure to the internet. Each open port is a potential entry point, so the risk depends on how secure the software behind it is and whether you keep it updated.
Do I need port forwarding for online gaming?
Usually not for normal matchmaking, since most consoles and games handle this automatically through UPnP. You're more likely to need it if you're hosting your own dedicated server rather than just joining games.
What's the difference between TCP and UDP?
TCP checks that data arrives correctly and resends anything lost, which suits things like web pages and file transfers. UDP is faster but doesn't check for lost data, which suits real-time things like voice chat and some games.
Can port forwarding affect my Wi-Fi speed?
No, port forwarding is about how incoming internet traffic is directed, not about Wi-Fi performance. If you're noticing slow speeds, it's more likely related to your router's placement or band, which our guide on 2.4GHz vs 5GHz Wi-Fi covers in more detail.
Is Tailscale free to use?
Tailscale and similar tools typically offer a free tier that's generous enough for personal use, though features and limits can change over time. Check the current details on the provider's own site before setting it up.
Will port forwarding work if I use powerline adapters?
Port forwarding happens at the router level, so it should work regardless of how your device connects physically. If you're using powerline adapters and having connection issues generally, our guide on whether powerline adapters work is worth a read first.


