{"id":109,"date":"2018-03-06T16:04:47","date_gmt":"2018-03-06T08:04:47","guid":{"rendered":"https:\/\/sumju.net\/?p=109"},"modified":"2018-03-06T16:07:30","modified_gmt":"2018-03-06T08:07:30","slug":"%e5%88%a9%e7%94%a8upnpc-%e5%ae%9e%e7%8e%b0%e8%87%aa%e5%8a%a8%e6%98%a0%e5%b0%84%e5%86%85%e7%bd%91%e7%ab%af%e5%8f%a3%e5%88%b0%e5%a4%96%e7%bd%91","status":"publish","type":"post","link":"https:\/\/sumju.net\/?p=109","title":{"rendered":"\u5229\u7528UPNPC \u5b9e\u73b0\u81ea\u52a8\u6620\u5c04\u5185\u7f51\u7aef\u53e3\u5230\u5916\u7f51"},"content":{"rendered":"<p>\u4eca\u5929\u7a81\u53d1\u5947\u60f3\uff0c\u60f3\u8ba9\u81ea\u5df1\u7684\u6811\u8393\u6d3e\u67d0\u4e2a\u7aef\u53e3\u81ea\u52a8\u6620\u5c04\u5230\u516c\u7f51\uff0c\u60f3\u8d77\u6765\u8def\u7531\u5668\u6709\u4e2aUPNP\u529f\u80fd\u5e76\u4e14\u5df2\u7ecf\u5f00\u542f\uff0c\u90a3\u6811\u8393\u6d3e\u80af\u5b9a\u4e5f\u53ef\u4ee5\u5229\u7528\u8fd9\u4e2a\u529f\u80fd\u81ea\u52a8\u628a\u5bf9\u5e94\u7aef\u53e3\u6620\u5c04\u5230\u516c\u7f51\u4e4b\u4e0a\uff0c\u60f3\u5230\u8fd9\u91cc\u4e8e\u662f\u4e4e\u6211\u4e0a\u7f51\u641c\u5230\u4e00\u4e2alinux\u4e0b\u7684\u5c0f\u5de5\u5177\u540d\u4e3a\uff1aMiniUPnP<\/p>\n<p>\u4e8e\u662f\u4e0b\u8f7d\u4e0b\u6765\u4f20\u5230\u6811\u8393\u6d3e\u4e0a\u7f16\u8bd1\u5b89\u88c5<br \/>\n\u8fd9\u91cc\u4e5f\u63d0\u4f9b\u7ed9\u5927\u5bb6\u4e0b\u8f7d\u94fe\u63a5<\/p>\n<p>http:\/\/miniupnp.free.fr\/files\/<\/p>\n<p>\u672c\u7ad9\u4e0b\u8f7d\uff1a<\/p>\n<p><a href=\"https:\/\/sumju.net\/wp-content\/uploads\/2018\/03\/miniupnpc-2.0.20180222.tar.gz\">miniupnpc-2.0.20180222.tar<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u4e0b\u9762\u4e3e\u4e2a\u4f8b\u5b50\uff1a<\/p>\n<p>\u589e\u52a0\u4e00\u4e2aUPNP\u8bbe\u7f6e\uff0c\u628a\u672c\u673a\u768480\u7aef\u53e3\u6620\u5c04\u5230\u7f51\u5173\u76848008\u7aef\u53e3\uff1a<\/p>\n<p>upnpc -a 192.168.88.162 80 8008 TCP<\/p>\n<p>\u5220\u9664\u8fd9\u4e2a\u8bbe\u7f6e:<\/p>\n<p>upnpc -d 8008 TCP<\/p>\n<p>\u4e0b\u9762\u662f\u8fd0\u884c\u540e\u7684\u7ed3\u679c\uff1a<\/p>\n<p><code><br \/>\nroot@raspberrypi:~# upnpc  -a 192.168.88.162 80 8008 TCP<br \/>\nupnpc : miniupnpc library test client, version 2.0.<br \/>\n(c) 2005-2017 Thomas Bernard.<br \/>\nGo to http:\/\/miniupnp.free.fr\/ or https:\/\/miniupnp.tuxfamily.org\/<br \/>\nfor more information.<br \/>\nList of UPNP devices found on the network :<br \/>\ndesc: http:\/\/192.168.88.1:2828\/gateway.xml<br \/>\nst: urn:schemas-upnp-org:device:InternetGatewayDevice:1<br \/>\nFound a (not connected?) IGD : http:\/\/192.168.88.1:2828\/upnp\/control\/jmsjwlikhz\/wanipconn-1<br \/>\nTrying to continue anyway<br \/>\nLocal LAN ip address : 192.168.88.162<br \/>\nExternalIPAddress = 0.0.0.0<br \/>\nInternalIP:Port = 192.168.88.162:80<br \/>\nexternal 0.0.0.0:8008 TCP is redirected to internal 192.168.88.162:80 (duration=0)<br \/>\nroot@raspberrypi:~# upnpc -d 8008 TCP<br \/>\nupnpc : miniupnpc library test client, version 2.0.<br \/>\n(c) 2005-2017 Thomas Bernard.<br \/>\nGo to http:\/\/miniupnp.free.fr\/ or https:\/\/miniupnp.tuxfamily.org\/<br \/>\nfor more information.<br \/>\nList of UPNP devices found on the network :<br \/>\ndesc: http:\/\/192.168.88.1:2828\/gateway.xml<br \/>\nst: urn:schemas-upnp-org:device:InternetGatewayDevice:1<br \/>\nFound a (not connected?) IGD : http:\/\/192.168.88.1:2828\/upnp\/control\/jmsjwlikhz\/wanipconn-1<br \/>\nTrying to continue anyway<br \/>\nLocal LAN ip address : 192.168.88.162<br \/>\nUPNP_DeletePortMapping() returned : 0<br \/>\nroot@raspberrypi:~#<br \/>\n<\/code><\/p>\n<p>\u5229\u7528\u8fd9\u4e2a\u547d\u4ee4\u5927\u5bb6\u5b8c\u5168\u53ef\u4ee5\u81ea\u5df1\u7f16\u5199\u4e00\u4e2a\u542f\u52a8\u811a\u672c\uff0c\u5f53\u6811\u8393\u6d3e\u542f\u52a8\u4e4b\u540e\u81ea\u52a8\u8fd0\u884c\u6765\u63d0\u4ea4\u7aef\u53e3\u6620\u5c04\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u5929\u7a81\u53d1\u5947\u60f3\uff0c\u60f3\u8ba9\u81ea\u5df1\u7684\u6811\u8393\u6d3e\u67d0\u4e2a\u7aef\u53e3\u81ea\u52a8\u6620\u5c04\u5230\u516c\u7f51\uff0c\u60f3\u8d77\u6765\u8def\u7531\u5668\u6709\u4e2aUPNP\u529f\u80fd\u5e76\u4e14\u5df2\u7ecf\u5f00\u542f\uff0c\u90a3\u6811&hellip; <a href=\"https:\/\/sumju.net\/?p=109\" class=\"more-link read-more\" rel=\"bookmark\">\u7ee7\u7eed\u9605\u8bfb <span class=\"screen-reader-text\">\u5229\u7528UPNPC \u5b9e\u73b0\u81ea\u52a8\u6620\u5c04\u5185\u7f51\u7aef\u53e3\u5230\u5916\u7f51<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[14,16],"tags":[],"class_list":{"0":"post-109","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-linux","7":"category-raspberry-pi","8":"h-entry","10":"h-as-article"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/sumju.net\/index.php?rest_route=\/wp\/v2\/posts\/109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sumju.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sumju.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sumju.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sumju.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=109"}],"version-history":[{"count":4,"href":"https:\/\/sumju.net\/index.php?rest_route=\/wp\/v2\/posts\/109\/revisions"}],"predecessor-version":[{"id":114,"href":"https:\/\/sumju.net\/index.php?rest_route=\/wp\/v2\/posts\/109\/revisions\/114"}],"wp:attachment":[{"href":"https:\/\/sumju.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sumju.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sumju.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}