Universal Plug and Play
lastmod 2026-01-21created 2026-01-214 edits
A standard for automatically configuring networks without user intervention, used in media sharing servers, home networks, and the like.
Features
Home internet routers handle NAT by default, so incoming connections are blocked by default. As a result, users have to manually configure the NAT to allow external access through port forwarding and the like, which is inconvenient. UPnP solves this by allowing applications to configure network settings automatically, so users can set up their network easily without having to change router settings themselves. A typical example is BitTorrent, where the torrent client automatically performs port forwarding for communication via UPnP.
UPnP is also used for automatic port forwarding in online games that adopt a dedicated server model.
If UPnP is unavailable, hole punching is attempted. Most home routers apply rules with fixed port numbers, so hole punching is possible without much difficulty, but it is difficult when the NAT type is Symmetric, such as with enterprise firewalls or the NAT that carriers use for IP allocation, mainly on mobile networks (3G, LTE, 5G, etc.).
With the arrival of NAS and high-resolution audio, the need for large-capacity media servers grew, and media servers using UPnp began to attract attention.
Because it has become so widespread, the feature is built in by default not only in NAS devices but also in routers, which has the advantage that if an external hard drive or the like is connected, it can be used right away as a media server.
Above all, it becomes very useful on smartphones, TVs, and the like, because it lets you make the most of a NAS, for example by putting videos or lots of music on it and playing them over the network.
Media server
Media servers differ by NAS, but the basic structure is the same. Listings are divided into folders, albums, photos, and videos, and through these, PCs or network players connected to the same network connect and play the content.
To reduce data usage when the network is poor or when connecting from an external network, they have powerful built-in features: video servers lower the quality on their own, and audio servers convert unplayable audio into another audio format in real time before sending it. Unfortunately, they cannot recognize subtitles such as ass and smi. In such cases, the app provided by the media server or a media server player app sometimes solves the problem, but there are also cases where it is supported outright, so you need to check this point carefully before buying a product.
Thanks to such media servers, the range of uses has become very wide, but the problem is that the daemons or apps that run the media server often go down. In particular, when such a media server is built on a router, speed sometimes drops markedly with just 2–3 users connected, and connections start becoming unstable. Building it on a NAS improves these problems to some extent, but the NAS also gradually slows down each time media is added. When the media server's performance is poor, there is also the problem that connections become seriously slow as the number of users increases.
The only way to solve this is to stop the app or daemon and restart it. However, on some routers (especially iptime), the problem is only resolved by rebooting the router itself.
Music media servers have the drawback that album art is displayed in low quality. Even if the album art is high quality, whether on a router or a NAS, it is recompressed to low-quality album art and stored when the media server builds its DB. It seems this was made part of the standard outright to reduce the media server's load and to ease transfer speed. Above all, users with thousands to tens of thousands of songs face the drawback that the media server takes a long time to build its database the first time.
If the media server supports power saving, it is best to set a generous timeout if possible. If the timeout is short, the connected hardware loads a lot of music into its buffer and does not read from the media server while filling that buffer, so the server goes into power saving. When it starts reading again, music does not play during the delay while power saving is lifted, and frequent wake-ups of the hard disk also have a bad effect on the hard disk.
Security vulnerabilities
Since it can control the network without manual user intervention, security problems naturally arise. In addition, security vulnerabilities in the UPnP standard itself have come to the fore, so advanced users are advised to stop using it. Because of its convenience, it is very easy for malware to exploit (abusing the fact that it can configure the network without direct user action), and since UPnP itself has no security specification, once a hacker gets into the network it is easy to access most devices.
In 2013, the US security company Rapid7 reported that UPnP devices responded from about 80 million IP addresses. This means that numerous devices such as webcams and TVs can be accessed remotely from external IP addresses.
Because of these vulnerabilities, router OS wikis/communities such as OpenWrt and PfSense strongly discourage using the UPnP feature and instead recommend configuring the firewall manually, even if it is inconvenient.
See also
- VPN
- Digital Living Network Alliance (DLAN)
- NAT-PMP
- miniupnp
Favorite site
- Universal Plug and Play - Wikipedia
- Universal Plug and Play - Namuwiki
- Understanding UPnP and DLNA easily : Naver Blog
- What UPnP is, its characteristics, and why you should disable it for network security | NordVPN
- Should I enable UPnP and NAT-PMP on my network? I don't see how it's different from removing the firewall. : r/homelab