LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

upnpc

Configure UPnP port forwarding on routers

TLDR

Forward external port to local
$ upnpc -a [192.168.0.1] 8080 80 tcp
copy
Delete port forwarding
$ upnpc -d 80 tcp
copy
Get device information
$ upnpc -s
copy
List existing redirections
$ upnpc -l
copy

SYNOPSIS

upnpc [OPTIONS] [COMMAND]

DESCRIPTION

upnpc configures port forwarding rules on a router using the UPnP (Universal Plug and Play) protocol. It allows applications to automatically set up port forwarding without manual router configuration.The tool can add, remove, and list port mappings, as well as query information about UPnP-enabled devices on the network.

PARAMETERS

-a IP INTERNALPORT EXTERNALPORT PROTOCOL

Add port mapping
-d EXTERNALPORT PROTOCOL_
Delete port mapping
-s
Show UPnP device information
-l
List existing port redirections

INSTALL

sudo apt install miniupnpc
copy
sudo dnf install miniupnpc
copy
sudo pacman -S miniupnpc
copy
sudo apk add miniupnpc
copy
sudo zypper install miniupnpc
copy
brew install miniupnpc
copy
nix profile install nixpkgs#miniupnpc
copy

CAVEATS

Router must support and have UPnP enabled. Some ISP routers disable UPnP for security. Port mappings may be temporary. UPnP has security implications.

HISTORY

upnpc is part of the miniupnpc library, providing command-line access to UPnP Internet Gateway Device functionality.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid