How to use upnpc

Hackbydoing Academy tool guide · Network scanning & recon · free, no login

What upnpc is, in plain words

Upnpc talks UPnP to the router: it lists and changes port-forwarding rules — handy for testing, and a favorite trick of malware that wants a door opened from the internet.

A working upnpc command

upnpc -l

Asks the router (via UPnP) to list its current port-forwarding mappings — including any a piece of malware quietly asked it to open.

Every piece of the command, explained

-lList the router's existing port mappings.
-aAdd a mapping: the pieces after it are this machine's address, the external port, the internal port, and the protocol.

Use it the legal way

Only run upnpc on systems you own or have explicit, written permission to test — at work that means a signed engagement, at home that means your own lab. Inside Hackbydoing Academy you practice on simulated networks and lab machines built for exactly this, where breaking things is the lesson and no one else's systems are involved. Learning how a tool works also teaches you what it looks like from the defender's chair: the logs it leaves, the traffic it makes, and the settings that shut it down.

✦ Practice upnpc hands-on in a guided lab

Reading about upnpc is step one. In the Academy you run it yourself, step by step, in guided labs on simulated networks — 185 rooms covering attack and defense, from your first scan to full operations, with a defender's debrief at the end of every room. Founding membership is $9.99/mo for the first 500 members.

Join Hackbydoing Academy →

Related tool guides

Free from the Hackbydoing Academy — learn cybersecurity by doing: real tools, guided labs, attack and defense, on simulated networks. More free material: Tool Guides index · Free Downloads Library · Hackbydoing Academy · Print this page (Ctrl/Cmd+P) for a clean paper copy.