Published Dec 4, 2026, 8:00 AM EST Korbin is a Linux system administrator who spends most of his time in a terminal figuring out how things actually work. Over the last decade he's written hundreds of articles about Linux configuration, troubleshooting weird problems, and using open-source tools in the real world. He also works a lot with Windows systems and networking, especially in mixed environments where things don't always behave the way the documentation says they should. Writing things down is how he makes sense of it all and hopefully saves someone else a few hours. It used to be safe to assume that a port on a home router only got opened if someone intentionally went into the settings and configured it that way. That's what manual port forwarding is, where you're basically telling the router to send inbound connections to a particular device, so long as the traffic is destined for X port. The slight annoyance of configuring port forwarding had a positive side effect of giving you time to think twice before poking a hole in your router. UPnP (Universal Plug and Play) skips the whole ceremony that came with port forwarding. When enabled, it allows devices on the network to ask the router to forward ports on their behalf. In theory, this sounds like a nice option, but it's commonly enabled by default on consumer routers, and plenty of people don't even realize it. UPnP lets a router take orders from devices A compromised system becomes easier to access Credit: The way UPnP works is pretty simple. If an application wants to accept incoming connections from outside your network (like the internet), it can ask the router to forward ports. For example, a co-op game that you host may run on port 34500 and need to accept incoming traffic from your friend on that specific port so they can connect to your game. As long as UPnP is enabled, the router will configure the port mapping and begin sending their traffic straight to your device. As long as the devices on your network and the applications requesting port mappings are trustworthy, then UPnP is a very convenient way to open the necessary ports. The trouble is that most implementations of UPnP don't prompt you for your router's admin password first, or even send a notification for you to approve. That means that a compromised system can expose itself to incoming external connections, unbeknownst to whoever's running the network. Malware authors absolutely take advantage of this quirk and build nefarious programs to abuse UPnP on an infected device. To clarify, UPnP itself doesn't lead to infection, but it does make an already compromised system more threatening, and bad actors are delighted to find a router that has it turned on. The botnet Dysphoria has been making rounds lately, and it uses UPnP to turn infected devices into proxy relays. Turning off UPnP is easy But check what's open first I keep UPnP switched off. I host multiple services from my home lab, and if one starts accepting inbound traffic, I want to know about it. Setting up manual port forwarding means opening my network is a deliberate choice, not something an application turned on without me realizing it. If you decide to do the same, first log into your router and check whether any port mappings are already active. The UPnP toggle is usually under advanced settings, or the NAT or WAN configuration page. It's worth taking a look to see what's been accepting incoming connections, if anything. If any entries are hard to explain, check what's on the destination device to see what's been listening. Turning UPnP off is usually just a single toggle. Some routers may also list NAT-PMP or PCP, which are similar port mapping protocols. Switch those off as well if yours has them. Restarting the router will flush any lingering rules. After that, the list of port mappings should be empty. When a service on your network needs to be reachable, you can still forward the port by hand. It's not as effortless as UPnP, but it only needs to be configured once per service, and it puts you in full control of your network. For remote access, something like Tailscale is a better choice anyway. It's what I use to access my home network whenever I'm away. It works without UPnP and adds security because you don't need to open a port to the entire internet. The convenience can't be denied UPnP makes stuff just work There's something to be said for UPnP's convenience, and there's a reason that router manufacturers began shipping their products with the setting turned on. For the average consumer, fiddling with router menus can be cumbersome and annoying. Without UPnP, stuff that should be simple stops working until you pull up the router's page and make the necessary changes. I'd still trade the convenience for a more tightly secured network. If nothing else, I'd recommend turning UPnP off and seeing what breaks. If you decide the theoretical risk isn't worth the inconvenience, at least you'll have a better idea of what UPnP is allowing through. Some router firmware, like OPNsense, lets you restrict UPnP to certain IP addresses, which is better than going network-wide. Stay in control of what gets in your network Ports should stay closed until you decide to open one up. UPnP takes that decision away from you, and worse, gadgets can make requests without letting you know about it. My recommendation: switch it off and manually add the port mappings that you actually need.
Most routers ship with UPnP on, and it lets any device quietly open ports to the internet
Full Article
Original Source
Read the full article at Xda-developers →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.