Will It Work? · Guide
UPnP on or off: what it opens on your router
By Bulan Sarkar, founder of ElectronicsInfoline (since 2000)
A setting called UPnP sits on a home router's advanced page, and the advice about it differs: games and chat apps ask for it, while router makers warn about what it can open. This guide is drawn from two makers' support pages (one read on its US and India sites), which give both sides. Menus differ by model.
UPnP lets devices on your network open ports on the router without you. Turn it off if nothing needs to be reached from the internet. If a camera or game server needs ports you can look up, keep it off and add port-forwarding rules by hand. Turn it on only for a program that changes its ports, and check the router's UPnP table now and then.
What UPnP does
UPnP (Universal Plug and Play) lets devices on your network set up port forwarding automatically, with no manual setup (TP-Link). The common uses are online gaming, media streaming and peer-to-peer apps (TP-Link). It works only when both the router and the device support it and UPnP is turned on in the router (NETGEAR), and only for programs that support the protocol (TP-Link).
The risk
That convenience is also the risk: malicious programs can use UPnP to open ports without your knowledge (TP-Link), and a worm or malware program can use it to compromise the security of your home network (NETGEAR). With UPnP off, the router does not let any device control its resources, such as port forwarding, on its own (NETGEAR).
On or off: how to choose
One maker suggests disabling UPnP if you do not need it, and keeping the firmware up to date (TP-Link). The other recommends setting up port forwarding by hand instead of turning UPnP on, while noting that some cases do need dynamic port forwarding (NETGEAR).
So the question is what needs to be reached from outside. A camera or a game server with ports listed by its maker is better served by fixed rules, which open only those ports. UPnP fits a program whose ports change. If you keep it on, check the UPnP table for ports you do not recognise (TP-Link).
Find the setting
On one maker's routers, log in and go to Advanced > NAT Forwarding > UPnP; on its mesh systems the switch is in the app under More > Advanced > NAT forwarding > UPnP (TP-Link). On the other maker's routers, go to ADVANCED > Advanced Setup > UPnP and tick or clear Turn UPnP On (NETGEAR).
Do not assume the default. On the routers one maker's page covers, the box is ticked by default (NETGEAR). The other maker says UPnP is on by default on one router (TP-Link) and off by default on some models (TP-Link). The UPnP table on the same page lists each device's IP address and the internal and external ports it opened (NETGEAR).
If it is on and still fails
Check that the device supports UPnP, restart both the router and the device, and make sure a firewall is not blocking UPnP traffic (TP-Link). UPnP opens ports on your router only. If the router's own WAN address is private or carrier-grade NAT, traffic from the internet stops before it reaches your router (TP-Link) (TP-Link); the port-forwarding guide shows how to read that address.
Tips and tricks
- Open the router’s UPnP page and check whether it is on; the default differs between models.
- If a camera or game server lists its ports, add fixed rules for them and leave UPnP off.
- With UPnP on, look through the UPnP table now and then for devices or ports you do not recognise.
- Keep the router’s firmware up to date, whichever way you set UPnP.
- Leave the advertisement period and time to live at their defaults at home.
What we would do
We would turn UPnP off, then add a DHCP reservation and a port-forwarding rule for each device that needs one. We would turn it back on only if a program's maker said it needs UPnP, and then check the table after the first use.
Questions people ask
What is UPnP on a router? Universal Plug and Play. With it on, devices on your network can set up port forwarding on the router by themselves, without you typing a rule.
Should I turn UPnP off? If nothing on your network needs to be reached from the internet, yes: one maker suggests disabling it if you do not need it. If a device needs fixed ports you can look up, the other maker recommends adding port-forwarding rules by hand instead.
Is UPnP a security risk? It can be. Both makers warn that malicious programs or worms can use it to open ports without your knowledge. That is the main reason to keep it off unless something needs it.
Is UPnP on by default? It depends on the model. One maker’s page shows the box ticked by default on the routers it covers; the other maker says UPnP is on by default on one router and off by default on some models. Open the UPnP page on yours and look.
My console still has trouble with UPnP on. What now? Check that the device supports UPnP, restart both the router and the device, and check that a firewall is not blocking UPnP traffic. If the router’s WAN address is private or carrier-grade NAT, opening ports on your router alone will not help; see the port-forwarding guide.
Sources
Each figure on this page is quoted from the source below or worked out from them. Sources checked , each quote read again against the source in a second pass.
- TP-Link, TP-Link FAQ 4624 (US): UPnP, what it is and how to manage it:
Universal Plug and Play (UPnP) allows devices on your network to automatically configure port forwarding without manual setup. … Common use cases include online gaming, media streaming, and peer-to-peer applications. … Malicious applications can exploit it to open ports without your knowledge. … If you do not need UPnP, consider disabling it and keeping your firmware up to date. … check for unexpected or unrecognized port openings in your router's UPnP table … Go to Advanced > NAT Forwarding , then find UPnP … More > Advanced > NAT forwarding, find UPnP … Restart both your router and the UPnP-enabled device. … For some TP-Link models, UPnP is disabled by default for security reasons. … Ensure the device supports UPnP. … Make sure that your firewall isn't blocking UPnP traffic.
tp-link.com/us/support/faq/4624/ - TP-Link, TP-Link FAQ 1543 (US): UPnP for online console games:
UPnP is enabled by default in this router. … Only the application supporting UPnP protocol can use this feature. … Go to Advanced > NAT Forwarding > UPnP and toggle on or off
tp-link.com/us/support/faq/1543/ - NETGEAR, NETGEAR KB 24306: turning UPnP on or off:
A worm or malware program can use UPnP to compromise the security of your LAN. … We recommend that you manually set up port forwarding instead of enabling UPnP. … However, in some cases, dynamic port forwarding is required. … Select ADVANCED > Advanced Setup > UPnP … By default, this check box is selected. … the router does not allow any device to automatically control router resources, such as port forwarding … This value can range from 1 to 1440 minutes. The default period is 30 minutes. … The number of hops can range from 1 to 255. The default value for the advertisement time to live is 4 hops … The UPnP Portmap Table displays the IP address of each UPnP device that is accessing the router and which ports (internal and external) that device opened. … which should be fine for most home networks
kb.netgear.com/24306/How-do-I-enable-or-disable-Universal-Pl… - NETGEAR, NETGEAR KB 20917: what port forwarding is:
The server device must always have the same IP address. … If your router and the server device on your local network both support UPnP, and UPnP is enabled in the router web interface, the required router configuration for inbound traffic occurs automatically. … setting up a DMZ removes all of your router’s firewall protection for a device … if you have an IP camera or FTP server on your network that you want to be accessible via the Internet
kb.netgear.com/20917/What-is-port-forwarding - TP-Link, TP-Link FAQ 1379 (US): setting up port forwarding:
Port forwarding tells your router to direct incoming Internet traffic on a specific port to a device on your local network. … It is commonly used for gaming, remote access, and hosting a server or website from home. … the local IP address of the device you are forwarding to, the port number your service requires, and the protocol (TCP, UDP, or ALL) … The External Port and Internal Port are usually the same, unless you are forwarding the same port to multiple devices. … assign a static IP address to your device or use address reservation on your router … Port forwarding only works from the Internet if your router has a public WAN IP address. … Go to Forwarding > Virtual Servers … Go to Advanced > NAT Forwarding > Virtual Servers … Go to Advanced > NAT Forwarding > Port Forwarding … If you are not sure, select ALL … If you need to enter a port range (for example, xx-xx), leave the Internal Port field empty. … http://WAN IP:port number (for example, http://192.203.115.77:90) … you must first change the router's remote management port, because port 80 is the default … such as 8080 … port 90 on both 192.168.0.106 and 192.168.0.103), create two separate rules using different External Ports (such as 9000 and 9001) and the same Internal Port (90) … there is another network address translation (NAT) device between your router and the Internet. You will need to open the required ports on that device as well. … Some ISPs (such as those using Carrier-Grade NAT, or CG-NAT) assign private IPs by default, which prevents port forwarding from working over the Internet. … Some models support different External Ports and Internal Ports.
tp-link.com/us/support/faq/1379/ - TP-Link, TP-Link FAQ 785 (US): port forwarding not working:
If the WAN IP is private or a CGNAT address (100.64.0.0–100.127.255.255), port forwarding will not work … Always verify the server is accessible from the local network before troubleshooting port forwarding rules. … Windows Firewall can block port forwarding connections. … Most 4G/LTE and 5G ISPs assign private IP addresses by default … including the correct internal IP address, port number, and protocol … the gateway on the client’s settings should be the router’s LAN IP address … prevent you from using OpenVPN or port forwarding and affect the NAT Type … you will need to open the same port on the upstream modem router as well
tp-link.com/us/support/faq/785/