Home GNU/Linux 端口映射工具:miniupnp自带的upnpc
formats

端口映射工具:miniupnp自带的upnpc

- no title specified


端口映射工具:miniupnp自带的upnpc

miniupnp的客户端源代码包中自带咯一個用于测试的小程序upnp.c,在编译安装的时候也會一同被安装到系统中,可执行程序名为upnp,直接使用它便可以向网关申请启用某個端口的映射咯。

例如,将TCP的15245端口映射到192.168.1.104这台内网机器的15245端口:

bash-4.0# upnpc -a 192.168.1.104 15245 15245 tcp

upnpc : miniupnpc library test client. (c) 2006-2011 Thomas Bernard

Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/

for more information.

List of UPNP devices found on the network :

desc: http://192.168.1.1:1900/igd.xml

st: urn:schemas-upnp-org:device:InternetGatewayDevice:1

Found valid IGD : http://192.168.1.1:1900/ipc

Local LAN ip address : 192.168.1.104

ExternalIPAddress = 183.17.38.116

InternalIP:Port = 192.168.1.104:15245

external 183.17.38.116:15245 TCP is redirected to internal 192.168.1.104:15245 (duration=0)

bash-4.0#

感谢作者。

miniupnp的主页:http://miniupnp.free.fr/

 
Tags:
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*


7 + = sixteen

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© 漂亮的笨蛋
credit