2008年12月22日 星期一

miniupnpc-1.2 test setting on ARM9

miniupnpc-1.2 installation on ARM9
=======================================================================
1. Link ARM9 lan wire to asus router and connect ASUS router to internet. the miniupnpc-1.2
had installed on ARM9 device.

ASUS Router setting default ip 192.168.1.1,router must enable upnp function first !!
































2. on ARM9 board
/ # ifconfig eth0 192.168.1.23
/ # route add -net 0.0.0.0 gw 192.168.1.1
/ # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0

/ # ping 192.168.50.1
PING 192.168.50.1 (192.168.50.1): 56 data bytes
64 bytes from 192.168.50.1: seq=0 ttl=63 time=10.498 ms
64 bytes from 192.168.50.1: seq=1 ttl=63 time=1.892 ms
64 bytes from 192.168.50.1: seq=2 ttl=63 time=1.892 ms
/ # ping 192.168.0.2
PING 192.168.0.2 (192.168.0.2): 56 data bytes
64 bytes from 192.168.0.2: seq=0 ttl=62 time=10.224 ms
64 bytes from 192.168.0.2: seq=1 ttl=62 time=2.655 ms
64 bytes from 192.168.0.2: seq=2 ttl=62 time=2.685 ms
64 bytes from 192.168.0.2: seq=3 ttl=62 time=2.594 ms

ok , now we can connect to internet.
/ # upnpc -m 192.168.1.23 -l
/ # upnpc -m 192.168.1.23 -s
check upnp IGD device on net.
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
3. try to open ports for our ARM9 device
/ # 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

/ # 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



4.check router status, we can see the ports had been sucessfully opened !!
asus router
Status & Log - Routing Table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.50.0 * 255.255.255.0 U 0 0 0 WAN
192.168.1.0 * 255.255.255.0 U 0 0 0 LAN
default 192.168.50.1 0.0.0.0 UG 0 0 0 WAN


Status & Log - Port Forwarding
Destination Proto. Port Range Redirect to
192.168.50.111 TCP 8081 192.168.1.23
192.168.50.111 TCP 8080 192.168.1.23
192.168.50.111 UDP 11142 192.168.1.23
192.168.50.111 TCP 11131 192.168.1.23
192.168.50.111 UDP 9001 192.168.1.3
192.168.50.111 TCP 80 192.168.1.3


type 192.168.50.111:80 on other PC browser,then you can see ARM9 webcam
if we already running this service on it!!

沒有留言: