2013年3月2日 星期六

upnpc testing report in real world


列出目前已經支援的routerports

/ # upnpc -m 192.168.2.23 -l

upnpc : miniupnpc library test client. (c) 2006-2008 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.2.1/root.sxml

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


Found valid IGD : http://192.168.2.1:4444/wipconn

Local LAN ip address : 192.168.2.23

Connection Type : IP_Routed

Status : Connected, uptime=634, LastConnectionError : ERROR_NONE

MaxBitRateDown : 10000000 bps MaxBitRateUp 10000000 bps

ExternalIPAddress = 59.115.131.135

0 TCP 88->192.168.2.23:8082 'video' ''

1 TCP 89->192.168.2.23:8081 'video-1' ''

GetGenericPortMappingEntry() returned 713 (SpecifiedArrayIndexInvalid)


upnpc 新開一個port 80 mappingarm9 device 8080

/ # upnpc -a 192.168.2.23 8080 80 tcp

upnpc : miniupnpc library test client. (c) 2006-2008 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.2.1/root.sxml

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


Found valid IGD : http://192.168.2.1:4444/wipconn

Local LAN ip address : 192.168.2.23

ExternalIPAddress = 59.115.131.135

InternalIP:Port = 192.168.2.23:8080

external 59.115.131.135:80 TCP is redirected to internal 192.168.2.23:8080





檢查一下 開port成功

/ # upnpc -m 192.168.2.23 -l

upnpc : miniupnpc library test client. (c) 2006-2008 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.2.1/root.sxml

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


Found valid IGD : http://192.168.2.1:4444/wipconn

Local LAN ip address : 192.168.2.23

Connection Type : IP_Routed

Status : Connected, uptime=646, LastConnectionError : ERROR_NONE

MaxBitRateDown : 10000000 bps MaxBitRateUp 10000000 bps

ExternalIPAddress = 59.115.131.135

0 TCP 80->192.168.2.23:8080 'libminiupnpc' ''

1 TCP 88->192.168.2.23:8082 'video' ''

2 TCP 89->192.168.2.23:8081 'video-1' ''

GetGenericPortMappingEntry() returned 713 (SpecifiedArrayIndexInvalid)

/ # Jan 2 00:13:33 MJPG-streamer [936]: serving client: 220.132.160.12:36267

Jan 2 00:13:33 MJPG-streamer [936]: serving client: 220.132.160.12:36268


arm9 device ip = 192.168.2.23)需加上gateway

/ # route add -net 0.0.0.0 gw 192.168.2.1

否則會找不到device


在公司電腦開瀏覽器 打入59.115.131.135 然後enter就可以連上webcam


刪除這個port mapping

upnpc -m 192.168.2.23 -d 80 tcp


加入8080 mapping arm9 8080 port

/ # upnpc -m 192.168.2.23 -a 5050 tcp 8080 tcp

在其他上網電腦開瀏覽器 打入59.115.131.1358080 然後enter就可以連上webcam

(ex. mjpg-streamer-r63)










If we want 11131/11142 ports service to out arm9 board then just type

upnpc -m 192.168.1.23 -r 11131 tcp 11142 udp



upnpc : miniupnpc library test client. (c) 2006-2008 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:5431/dyndev/uuid:0013d4d1-fe68-0013-d4d1-fe680032a9a2

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

Found a (not connected?) IGD : http://192.168.1.1:5431/uuid:0013d4d1-fe68-0013-1

Trying to continue anyway

Local LAN ip address : 192.168.1.23

ExternalIPAddress = 192.168.50.111

InternalIP:Port = 192.168.1.23:11131

external 192.168.50.111:11131 TCP is redirected to internal 192.168.1.23:11131

ExternalIPAddress = 192.168.50.111

InternalIP:Port = 192.168.1.23:11142

external 192.168.50.111:11142 UDP is redirected to internal 192.168.1.23:11142




If we want 8080/8081 service to out arm9 board then just type

upnpc -m 192.168.1.23 -r 8080 tcp 8081 tcp

upnpc : miniupnpc library test client. (c) 2006-2008 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:5431/dyndev/uuid:0013d4d1-fe68-0013-d4d1-fe680032a9a2

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

Found a (not connected?) IGD : http://192.168.1.1:5431/uuid:0013d4d1-fe68-0013-1

Trying to continue anyway

Local LAN ip address : 192.168.1.23

ExternalIPAddress = 192.168.50.111

InternalIP:Port = 192.168.1.23:8080

external 192.168.50.111:8080 TCP is redirected to internal 192.168.1.23:8080

ExternalIPAddress = 192.168.50.111

InternalIP:Port = 192.168.1.23:8081

external 192.168.50.111:8081 TCP is redirected to internal 192.168.1.23:8081



check put route setting ,the port had been successfully added!!

沒有留言: