# Port Forwarding and UPnP: The Security Risks Explained URL: https://www.mytechnician.tech/tips/port-forwarding-upnp-security-risks/ Published: 2026-08-07 | Author: Ankit Kumar Tags: Security, Network, Privacy, Gaming Summary: Port forwarding opens your home network to the internet, and UPnP lets any app do it silently. Here is what to close, what to keep, and safer ways to get remote access. Recommended app: Network Traffic Monitor & Analyzer — https://www.mytechnician.tech/apps/network-monitor/ (Microsoft Store: https://apps.microsoft.com/detail/9NGCWN2BKVSC?hl=en-us&cid=mytechnician-web). Optional; every step below uses built-in Windows tools. ## The Problem Your router's firewall works by default because of one simple rule: connections you start are allowed out, and connections started from outside are dropped. Nothing on the internet can reach your PC, your NAS, or your camera unless you deliberately make an exception. **Port forwarding** is that exception. It tells the router "traffic arriving on port 3389 goes to the desktop in the study" — and from that moment, anyone on the internet can reach the desktop in the study. **UPnP** is worse, because it lets any program on your network create those exceptions automatically, with no prompt and no record you would notice. A game asks for a port; so does a camera; so does malware. Automated scanners sweep the entire internet continuously. A forwarded port is found within hours, not months. That is not a reason to panic — it is a reason to know exactly which holes exist in your firewall and why. > **Setting up remote access to your PC?** Read [secure Remote Desktop (RDP)](https://www.mytechnician.tech/tips/secure-remote-desktop-rdp-windows-11/) before forwarding anything. Exposed RDP is the single most exploited home configuration there is. ## Which Ports Actually Matter | Port | Service | Risk if exposed | |---|---|---| | 3389 | Remote Desktop | Critical — brute-forced constantly, common ransomware entry point | | 445 / 139 | Windows file sharing | Critical — never expose to the internet | | 22 | SSH | High unless key-only authentication | | 23 | Telnet | Critical — unencrypted, no reason to exist | | 554 / 8000 / 8554 | Camera streams | High — indexed by search engines like Shodan | | 80 / 443 | Web server or router admin | High if it is the router's admin page | | 5900 | VNC | High — many installs have no password | | 25565, 27015 | Game servers | Moderate — depends entirely on the server software | The pattern: anything offering a login prompt to the internet will be found and attacked automatically. ## The Fix: Step-by-Step ### Step 1: See What Is Currently Open 1. Sign in to the router — usually `192.168.0.1` or `192.168.1.1`. 2. Find **Port Forwarding**, sometimes called **Virtual Servers**, **NAT Forwarding**, or **Applications & Gaming**. 3. Write down every rule: external port, internal IP, and which device it points at. Then check the UPnP-created rules, which are listed separately — look for **UPnP Port Mapping Table** or **UPnP Status**. Most people find entries they cannot explain here. ### Step 2: Delete Everything You Cannot Justify For each rule, ask: what device is this, does it still exist, and do I still need to reach it from outside the house? Delete anything where the answer is no. Devices get replaced and rules get left behind, still pointing at an IP that now belongs to something else entirely. Delete every camera-related rule outright — modern cameras do not need them: [secure smart home cameras](https://www.mytechnician.tech/tips/secure-smart-home-cameras-from-hacking/). ### Step 3: Turn Off UPnP Find **UPnP** — usually under **Advanced**, **NAT Forwarding**, or **WAN** — and switch it **off**. Save and reboot. The trade-off is honest: some games and consoles report a "strict NAT" afterwards, and a few applications need a manual rule instead. That is a small cost for removing every application's ability to open your firewall silently. If a game genuinely needs it, add a specific forwarding rule for that port to that console's reserved IP address, rather than turning UPnP back on for everything. ### Step 4: Confirm From Outside Testing from inside your network proves nothing — the router does not apply the same rules to internal traffic. From a phone on **mobile data** with Wi-Fi off: 1. Search "what is my IP" to get your public address. 2. Try to reach it on the ports you were forwarding. Or use an external port scanner such as the ShieldsUP test at grc.com, which checks common ports from outside. The goal is every tested port reporting as stealth or closed. ### Step 5: Turn Off Router Remote Management Separate from port forwarding, most routers have a **Remote Management** or **Web Access from WAN** setting that exposes the admin page itself. Find it and make sure it is **off**. An internet-facing router admin page with a default or weak password is how whole networks get taken over — and once inside, an attacker can add forwarding rules and change DNS at will. See [secure your home Wi-Fi router](https://www.mytechnician.tech/tips/secure-your-home-wifi-router/). ### Step 6: Use Safer Alternatives to Forwarding Almost every reason people forward ports now has a better answer: | You want | Instead of forwarding | Use | |---|---|---| | Reach your PC remotely | RDP on 3389 | Tailscale, WireGuard, or your router's VPN server | | View cameras away from home | Camera port | The vendor's cloud app | | Access files remotely | SMB on 445 | Your NAS's own secure remote service, or a VPN | | Host a game with friends | Open server port | The game's own hosting, or a VPN mesh | | Run a public website | Port 80/443 at home | Cheap hosting, or Cloudflare Tunnel | A **mesh VPN** like Tailscale is the single best replacement: it creates an encrypted connection between your own devices without opening any inbound port at all. Nothing is exposed to scanners because there is nothing listening from the internet's point of view. ### Step 7: If You Must Forward, Do It Narrowly Sometimes there is no alternative. Reduce the exposure: 1. **Reserve a static internal IP** for the device (DHCP reservation) so the rule cannot drift to another machine. 2. **Forward a single port**, never a range, and never use the router's "DMZ" mode — DMZ exposes every port on that device. 3. **Change the external port** to something non-standard. It does not stop a determined scan, but it removes most automated noise. 4. **Restrict source IP** if your router supports it, so only your office or a friend's address can connect. 5. **Harden the service itself**: strong unique password, account lockout, two-factor if available, and current patches. 6. **Review the rule quarterly** and delete it when the need ends. ### Step 8: Watch the Logs Enable logging on the router and check it occasionally. Repeated connection attempts on a forwarded port from many different countries is normal background scanning — it tells you the port has been found, which is your prompt to ask whether it still needs to be open. On the PC, failed sign-in attempts appear in Event Viewer under **Security**, event ID 4625. A run of them means something is actively trying passwords: [how to read Event Viewer](https://www.mytechnician.tech/tips/how-to-read-event-viewer-find-crash-cause/). ## What Not to Do * **Do not use DMZ mode.** It forwards every port to one device and removes its firewall protection entirely. * **Do not forward port 3389, 445, or 23 to the internet.** These are the three that turn into an incident. * **Do not leave UPnP on** because a forum post said it fixes NAT type. Add the specific rule instead. * **Do not assume a rule is harmless because the device is "just a printer".** Internet-facing printers are used to pivot into networks and to print unsolicited material. ## FAQ ### Is UPnP always dangerous? It is not malicious by design — it exists so consoles and apps can work without manual configuration. The danger is that it grants every program on your network the ability to open your firewall with no prompt and no visibility. On a home network with children's devices, smart gadgets, and downloaded software, that is too much trust to hand out automatically. ### Will turning off UPnP break my Xbox or PlayStation? It may change your reported NAT type from Open to Moderate, which can affect party chat and matchmaking in some games. The fix is a manual forwarding rule for that console's specific ports to a reserved IP address — a few minutes of work, and far narrower than leaving UPnP on. ### How quickly is an open port found? Hours. Internet-wide scanners sweep the entire IPv4 space continuously, and services like Shodan publish searchable results. Assume anything you expose is known publicly within a day. ### Is port forwarding safe if I use a strong password? Safer, but the password is only one of the risks — the software behind the port may have vulnerabilities that no password prevents. That is why a VPN, which exposes nothing, is preferred over forwarding plus a good password. ### What about IPv6? Does port forwarding still apply? IPv6 does not use NAT, so devices have globally routable addresses and the router's firewall is what protects them rather than address translation. Check that your router's IPv6 firewall is enabled and not set to allow all inbound — some ship permissive. ### My ISP uses CGNAT and port forwarding does not work. Is that bad? It is inconvenient for hosting and excellent for security — carrier-grade NAT means no inbound connections can reach you at all. A mesh VPN like Tailscale works fine behind CGNAT, which is another reason to prefer it. ## Still Not Working? If forwarding rules reappear after you delete them, UPnP is still enabled somewhere — check both the router and any mesh node or ISP-supplied box in bridge mode. If an external scan shows ports open that you never forwarded, your ISP router may have its own remote-management or IPTV rules; contact them, and consider putting your own router behind theirs. Related: [secure your home Wi-Fi router](https://www.mytechnician.tech/tips/secure-your-home-wifi-router/), [secure Remote Desktop (RDP)](https://www.mytechnician.tech/tips/secure-remote-desktop-rdp-windows-11/), [set up a guest network to isolate smart home devices](https://www.mytechnician.tech/tips/set-up-guest-network-isolate-smart-home-devices/). --- Source: https://www.mytechnician.tech/tips/port-forwarding-upnp-security-risks/ — My Technician, free Windows 10/11 troubleshooting guides. Related tool: Network Traffic Monitor & Analyzer (Network Traffic Monitor & Analyzer shows real-time bandwidth usage, active connections, and per-app network traffic on Windows 10 and 11.) — https://www.mytechnician.tech/apps/network-monitor/ More guides: https://www.mytechnician.tech/llms.txt