Linux ,c/c++, web,前端,php,js
分类:
2012-06-01 11:57:07
原文地址:让 Linux 支持 UPnP(实战) 作者:platinum
# tail -f /var/log/upnpd Aug 28 12:47:21 platinum upnpd[13713]: IGD root device successfully registered. Aug 28 12:47:23 platinum upnpd[13713]: Advertisements Sent. Listening for requests ... Aug 28 12:47:49 platinum upnpd[13720]: AddPortMap: DevUDN: uuid:75802409-bccb-40e7-8e6c-fa095ecce13e ServiceID: urn:upnp-org:serviceId:WANIPConn1 RemoteHost: (null) Prot: TCP ExtPort: 36881 Int: 192.168.39.170.36881 Aug 28 12:47:50 platinum upnpd[13720]: AddPortMap: DevUDN: uuid:75802409-bccb-40e7-8e6c-fa095ecce13e ServiceID: urn:upnp-org:serviceId:WANIPConn1 RemoteHost: (null) Prot: UDP ExtPort: 36881 Int: 192.168.39.170.36881 Aug 28 12:58:08 platinum upnpd[13720]: DeletePortMap: Proto:UDP Port:36881 Aug 28 12:58:08 platinum upnpd[13720]: DeletePortMap: Proto:TCP Port:36881 Aug 28 13:06:54 platinum upnpd[13720]: Failure in GateDeviceDeletePortMapping: DeletePortMap: Proto:UDP Port:36881 Aug 28 13:06:55 platinum upnpd[13720]: Failure in GateDeviceDeletePortMapping: DeletePortMap: Proto:TCP Port:36881 Aug 28 13:06:55 platinum upnpd[13720]: AddPortMap: DevUDN: uuid:75802409-bccb-40e7-8e6c-fa095ecce13e ServiceID: urn:upnp-org:serviceId:WANIPConn1 RemoteHost: (null) Prot: TCP ExtPort: 36881 Int: 192.168.39.170.36881 Aug 28 13:06:56 platinum upnpd[13720]: AddPortMap: DevUDN: uuid:75802409-bccb-40e7-8e6c-fa095ecce13e ServiceID: urn:upnp-org:serviceId:WANIPConn1 RemoteHost: (null) Prot: UDP ExtPort: 36881 Int: 192.168.39.170.36881 root@platinum /data/KERNEL # |
# iptables -vnL FORWARD Chain FORWARD (policy ACCEPT 57M packets, 31G bytes) pkts bytes target prot opt in out source destination 22973 24M ACCEPT tcp -- * * 0.0.0.0/0 192.168.39.170 tcp dpt:36881 3803 375K ACCEPT udp -- * * 0.0.0.0/0 192.168.39.170 udp dpt:36881 root@platinum /data/KERNEL # iptables -t nat -vnL PREROUTING Chain PREROUTING (policy ACCEPT 678K packets, 90M bytes) pkts bytes target prot opt in out source destination 654 58197 DNAT udp -- ppp0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:36881 to:192.168.39.170:36881 340 24283 DNAT tcp -- ppp0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:36881 to:192.168.39.170:36881 root@platinum /data/KERNEL # |
# tail /var/log/upnpd Aug 28 212248 platinum upnpd[32204] Advertisements Sent. Listening for requests ... Aug 28 212404 platinum upnpd[32277] UPnP SDK Successfully Initialized. Aug 28 212404 platinum upnpd[32277] Succesfully set the Web Server Root Directory. Aug 28 212404 platinum upnpd[32277] IGD root device successfully registered. Aug 28 212407 platinum upnpd[32277] Advertisements Sent. Listening for requests ... Aug 28 212412 platinum upnpd[32285] AddPortMap DevUDN uuid75802409-bccb-40e7-8e6c-fa095ecce13e ServiceID urnupnp-orgserviceIdWANIPConn1 RemoteHost (null) Prot TCP ExtPort 14540 Int 192.168.39.170.6115 Aug 28 212422 platinum upnpd[32285] DeletePortMap ProtoTCP Port14540 root@platinum /data/KERNEL # |