HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

upnpc — Configure port forwarding rules on your router via the UPnP protocol. More information: <https://man

Submitted by: @import:tldr-pages··
0
Viewed 0 times
portcommandconfigureupnpccliyourrulesforwarding
linux

Problem

How to use the upnpc command: Configure port forwarding rules on your router via the UPnP protocol. More information: <https://manned.org/upnpc>.

Solution

upnpc — Configure port forwarding rules on your router via the UPnP protocol. More information: <https://manned.org/upnpc>.

Forward the external TCP port 80 to port 8080 on a local machine:
upnpc -a {{192.168.0.1}} 8080 80 tcp


Delete any port redirection for external TCP port 80:
upnpc -d 80 tcp


Get information about UPnP devices on your network:
upnpc -s


List existing redirections:
upnpc -l

Code Snippets

Forward the external TCP port 80 to port 8080 on a local machine

upnpc -a {{192.168.0.1}} 8080 80 tcp

Delete any port redirection for external TCP port 80

upnpc -d 80 tcp

Get information about UPnP devices on your network

upnpc -s

List existing redirections

upnpc -l

Context

tldr-pages: linux/upnpc

Revisions (0)

No revisions yet.