← 返回命令列表

Linux command

upnpc 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Forward

upnpc -a [192.168.0.1] 8080 80 tcp

Delete

upnpc -d 80 tcp

Example

upnpc -s

List

upnpc -l

说明

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.

参数

-a _IP_ _INTERNAL_PORT_ _EXTERNAL_PORT_ _PROTOCOL_
Add port mapping
-d _EXTERNAL_PORT_ _PROTOCOL_
Delete port mapping
-s
Show UPnP device information
-l
List existing port redirections

FAQ

What is the upnpc command used for?

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.

How do I run a basic upnpc example?

Run `upnpc -a [192.168.0.1] 8080 80 tcp` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -a _IP_ _INTERNAL_PORT_ _EXTERNAL_PORT_ _PROTOCOL_ do in upnpc?

Add port mapping