What is UPnP? A complete guide to Universal Plug and Play

Universal Plug and Play (UPnP) is a set of networking protocols that allow devices on the same network to connect with each other. It’s a convenient setup option, as it doesn’t require any manual configuration, but it also comes with some security risks. In this guide, we’ll break down what UPnP is, how to use it, and what risks to be aware of.

Hands holding a phone, laptop, tablet, smartphone, and router together, with a red warning icon above.

What is UPnP?

UPnP is a group of network protocols that automatically discover devices on your network and open ports to connect them.

UPnP allows you to connect devices with zero manual configuration, which saves time and effort. For example, if you get a new printer, you can use UPnP to connect that printer to every computer in your house, without having to manually set up each connection.

The concept of UPnP was originally introduced by Microsoft in 1999. It was then developed by the UPnP Forum and is now maintained by the Open Connectivity Foundation.

What is UPnP used for?

UPnP has a wide variety of use cases, including:

  • Gaming. UPnP connects consoles like Xbox, PlayStation, or Nintendo Switch to the internet so you can play games online.
  • Remote home surveillance. UPnP lets you connect video cameras to your network so you can keep an eye on your home while you’re away.
  • Internet of Things (IoT) devices. UPnP makes it easy to set up digital assistants like the Amazon Echo Dot or home automation devices like smart thermostats and locks.
  • Smart TVs. Smart TVs require internet connectivity, and UPnP handles the network connection automatically.
  • Streaming videos. UPnP allows you to stream your favorite content through media servers or with devices like the Roku Streaming Stick.

What is UPnP on Xbox and other gaming consoles?

UPnP uses protocols to automatically open ports when your Xbox, PlayStation, Nintendo Switch, or other consoles are connected to your network. These ports enable online multiplayer gaming, voice chat, and other party features.

More specifically, UPnP sets your router to the appropriate network address translation (NAT) setting for online gaming. Xbox categorizes a user’s NAT configuration into three types based on how permissive it is for inbound connections: Open, Moderate, and Strict. You’ll typically need an Open NAT type to play online multiplayer games. UPnP helps you set up this NAT type without manual port forwarding.

UPnP makes multiplayer gaming setup much more convenient. Instead of having to find your port number and configure multiplayer features manually, your gaming console connects to your network automatically. While this saves time, it also comes with some security trade-offs, so you’ll need to be mindful while using it.

How does UPnP work?

UPnP builds on standard web and networking technologies — TCP/IP, HTTP, SSDP, XML, and SOAP — to discover devices and exchange control messages. UPnP Internet Gateway Device (IGD), or UPnP-IGD, handles the port opening on the router.

UPnP opens ports on your router when it detects a new device. If you want to use UPnP to share media files between your devices, you’ll use Digital Living Network Alliance (DLNA) standards, which are derived from UPnP.

UPnP uses a client/server model. This means control points (clients) on your network search for new devices (servers). When the control point detects a new device, it uses the UPnP process to connect it to the network. The UPnP advertisement period is how often your router broadcasts to devices on your network. In most cases, this advertisement period is 30 minutes.

The UPnP process consists of six steps:

  1. 1. Addressing. When a new device is detected, UPnP either requests an IP address from the DHCP server or, if no DHCP server responds, the device assigns itself a link-local IP address (Auto-IP).
  2. 2. Discovery. The new device identifies itself to other devices on the network. This step happens using UDP port 1900.
  3. 3. Description. The control point uses the HTTP protocol to extract a device description. This includes the device’s manufacturer details, serial numbers, driver details, and associated URLs. This information is formatted and presented in an XML file.
  4. 4. Control. The SOAP protocol sends messages between device URLs, which allow the control point to manage the devices remotely.
  5. 5. Eventing. UPnP sets up a notification system to alert the control point when a variable changes.
  6. 6. Presentation. If a device on the network provides a presentation URL, the control point displays the associated page in a web browser. From there, users can control their devices or view their status.

When enabled, the UPnP NAT traversal state setting allows connected devices to open traffic outside of your local network. UPnP makes it easier to configure devices on a local area network (LAN) for gaming or smart home systems.

Why isn’t UPnP safe?

UPnP isn’t always safe because it could expose your network to hackers and other security threats.

UPnP was originally designed to work on LANs, which meant only the devices on your network could connect. However, router misconfiguration could expose UPnP services to the wide area networks (WANs). Essentially, any device could connect to your network without any authentication or authorization.

UPnP usually assumes the devices trying to connect to it are trustworthy by default. Hackers often exploit this to launch attacks undetected. For example, a hacker could use UPnP to discover your network and connect to it by pretending to be an Xbox.

Once they’re on your network, the hacker could:

  • Remotely access other devices on the same network.
  • Install ransomware or other malware on your devices.
  • Steal sensitive data.
  • Use your router as a proxy while conducting other malicious activities online, which makes it look like those activities are coming from your network.
  • Set up a botnet with your devices to launch DDoS attacks.

A 2013 Rapid7 study found that more than 80 million unique endpoints opens in a new tab were exposed to the public internet through UPnP. Over the years, these exposed endpoints have enabled hackers to launch devastating cyberattacks.

Real-world UPnP exploits and vulnerabilities

Cybercriminals have used UPnP to launch a variety of serious cyberattacks. These include:

  • Flash UPnP. With this vulnerability, victims would interact with a malicious Adobe Flash applet, which would use UPnP to automatically open ports on their network, exposing devices to further risks.
  • Mirai botnet. In 2016, hackers used UPnP to create botnets with smart home and IoT devices to execute large-scale cyberattacks.
  • Pinkslipbot/QakBot. This family of malware uses UPnP protocols to infect devices, then steals banking credentials.
  • Eternal Silence. This hacking campaign uses UPnP to turn open routers into proxy servers, leaving them vulnerable to even more dangerous attacks. This is also sometimes called UPnProxy.
  • CallStranger. This security flaw (CVE-2020-12695) in the UPnP protocols allows hackers to force vulnerable devices to send traffic outside their networks and steal sensitive data.

Here’s a look at these UPnP exploits and vulnerabilities at a glance:

Exploit

Year

Abuse mechanism

Impact

Flash UPnP

2008

Adobe Flash applet

Open ports, exposed network

Mirai botnet

2016

IoT devices

Botnet attacks websites

Pinkslipbot/Qakbot

2007

Malware

Steals banking credentials and delivers additional malware (including ransomware)

Eternal Silence

2018

Open routers

Vulnerable networks

CallStranger

2020

Controlling device traffic

Sensitive information exposed to WAN

Should you enable or disable UPnP?

Most home internet users should disable UPnP on their routers to keep their networks secure. If you need to connect your devices, open the ports manually.

However, in some situations, UPnP makes setup more convenient. If you’re connecting trusted devices with updated firmware on a LAN, it’s generally safe to use. Some consoles and apps may also require UPnP for auto-configuration.

Benefits of turning UPnP on

Benefits of turning UPnP off

Convenience

Security

Faster device setup

Peace of mind

Network control

Is UPnP good for gaming?

If you enjoy online multiplayer games, UPnP can be helpful. It makes console setup much easier because it automatically opens ports.

If you’re gaming on a trusted home LAN, UPnP makes setup a little more convenient, and it’s generally safe. However, using UPnP to connect to the wider internet comes with security risks.

While the process is a little more complicated, it’s generally best to stick to manual port forwarding for gaming if you’re concerned about security.

What happens if you disable UPnP?

If you disable UPnP, your router will stop automatically opening ports for new devices. You’ll still have basic device connectivity, but you’ll need to manually configure some devices for them to work properly. For example, you may need to manually open ports for certain online games, self-hosted servers, or remote-access IoT devices.

“UPnP not successful” on Xbox: What does it mean?

If you get a “UPnP not successful” message on your Xbox, it means that your gaming console couldn’t set up the automatic port forwarding necessary to play multiplayer games.

This error can happen for a few different reasons — usually because UPnP is either disabled or misconfigured on your router, or your router doesn’t support this protocol. It can also happen if two devices request the same port.

To fix the problem, follow these steps:

  1. 1. Check your router’s administrative panel and confirm that UPnP is turned on.
  2. 2. Restart your router and your Xbox.
  3. 3. Check your router to make sure that only one device is requesting each port to prevent duplicate mappings.
  4. 4. If it’s still not working, update your router’s firmware and try again.
  5. 5. If you’re still getting an error message after trying these fixes, set up manual port forwarding on your Xbox instead.

How to enable or disable UPnP on your router

Follow these steps to enable or disable UPnP on your router:

  1. 1. Make sure your device is connected to the router’s network and open a web browser.
  2. 2. Type your router’s IP address into the address bar at the top of the browser.
  3. 3. This should open your router’s interface. Enter your username and password. These are usually listed on the back of your router or in the documentation that came with it.
  4. 4. Look for a section labeled “Advanced” or “Advanced Network” in your router settings. This section should contain a UPnP tab.
  5. 5. Look for a box you can check or uncheck to turn UPnP on and off.
  6. 6. If UPnP is enabled, adjust the advertisement time to suit your preferences — 30 minutes is standard.
  7. 7. Look for a field marked “Advertisement time to live” or something similar. The standard is 4, but you can increase it if UPnP isn’t functioning efficiently on your devices.
  8. 8. Click “Apply” or “Save” to complete the process.

The exact menus will vary depending on the brand of router you have. Many internet service providers, including Xfinity and Spectrum, also provide their own gateway devices. It may be helpful to look up instructions for your specific router model.

How to check if UPnP is enabled or disabled

Before you can adjust your UPnP settings, you need to know if the protocol is enabled or disabled on your router. To check, log into your router’s administrative panel. Check your UPnP settings under the “Advanced” tab.

You may also want to check if UPnP is exposing your devices to the broader WAN, which could leave you vulnerable to cyberattacks. To check this, use a port-exposure or UPnP test tool such as ShieldsUP!. After running the scan, check the results to confirm that remote management is turned off.

Safer alternatives to UPnP

UPnP isn’t the only way to configure devices on your network. There are several safer alternatives to UPnP you can use without the risk.

One of them is manual port forwarding. The process is more complex and time-consuming than using UPnP, but you can feel confident knowing your network is more secure.

Another option is NordVPN’s Meshnet, which securely connects your devices across networks for remote access. Meshnet creates a direct encrypted peer-to-peer connection between devices running the NordVPN app. It’s ideal for remote access, LAN parties with friends, and file sharing. However, it’s not a replacement for opening a port to arbitrary internet clients, so it may not work for every device.

UPnP

Manual port forwarding

NordVPN Meshnet

Setup effort

Minimal

Extensive

Minimal

Security

Limited

High

High

Best use

Connecting trusted devices on a LAN

Securely connecting devices

Remote device access, gaming, and file sharing

How to protect your home network

Since UPnP can cause security threats, it’s important to protect your network and your devices. If you need to use UPnP, enable UPnP-UP. This is a user profile setting that allows you to authenticate and authorize UPnP devices. UPnP-UP is defined in the UPnP specification, but support in consumer routers and devices is rare, so this option may not be available on your hardware.

However, enabling UPnP-UP is not a completely foolproof approach. The most secure option is to completely disable the UPnP protocols.

Regardless of which solution you choose, you can take additional steps to protect your home network from UPnP-related attacks and other security vulnerabilities:

  • Keep your router firmware updated. Many hackers exploit outdated firmware to launch attacks.
  • Change your router’s default admin credentials. Adjusting the administrative credentials makes it harder for hackers to break in.
  • Use WPA3. This security protocol makes wireless networks more difficult for cybercriminals to hack. If your router or devices don’t support WPA3, you can use WPA2 as a fallback.
  • Disable remote router management. This prevents malicious threat actors from accessing your device.
  • Keep your LAN devices patched. If you’re using UPnP to connect devices on a LAN, make sure they’re up to date.
  • Use a VPN router. A VPN router routes traffic from devices on your network through an encrypted VPN tunnel, adding a layer of security and privacy between your network and the wider internet.

Online security starts with a click.

Stay safe with the world’s leading VPN

FAQ

Also available in: Deutsch , English , Español , Suomi , Français , Italiano , 日本語 , ‪한국어‬ , Nederlands , Norsk , Polski , Português Brasileiro , Português , Svenska , Türkçe .

NordVPN experts

NordVPN experts

Our NordVPN experts know the ins and outs of cybersecurity solutions and strive to make the internet safer for everyone. With a finger on the pulse of online threats, they share their expertise and practical tips on how to avoid them. Whether you're a tech newbie or a seasoned user, you'll find valuable insights in their blog posts. Cybersecurity should be accessible to everyone — and we're making that happen, one blog post at a time.