{"id":1968,"date":"2024-06-19T11:03:01","date_gmt":"2024-06-19T03:03:01","guid":{"rendered":"https:\/\/airy.cn\/WordPress\/?p=1968"},"modified":"2024-06-19T11:03:01","modified_gmt":"2024-06-19T03:03:01","slug":"windows%e8%87%aa%e5%b8%a6%e7%9a%84%e7%ab%af%e5%8f%a3%e8%bd%ac%e5%8f%91","status":"publish","type":"post","link":"https:\/\/airy.cn\/WordPress\/?p=1968","title":{"rendered":"Windows\u81ea\u5e26\u7684\u7aef\u53e3\u8f6c\u53d1"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>\u901a\u8fc7&nbsp;<code>Windows<\/code>&nbsp;\u5b9e\u73b0\u7aef\u53e3\u8f6c\u53d1\u3002\u672c\u6587\u4e3a\u53c2\u8003\u8f6c\u53d1\u6587\u7ae0<\/p>\n\n\n\n<p>\u4f7f\u7528<code>Portproxy<\/code>\u6a21\u5f0f\u4e0b\u7684<code>Netsh<\/code>\u547d\u4ee4\u5373\u80fd\u5b9e\u73b0<code>Windows<\/code>\u7cfb\u7edf\u4e2d\u7684\u7aef\u53e3\u8f6c\u53d1\uff0c\u8f6c\u53d1\u547d\u4ee4\u5982\u4e0b:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>1<\/td><td>netsh interface portproxy add v4tov4 listenaddress=[localaddress] listenport=[localport] connectaddress=[destaddress]<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u89e3\u91ca\u4e00\u4e0b\u8fd9\u5176\u4e2d\u7684\u53c2\u6570\u610f\u4e49<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>listenaddress<\/code>\u00a0\u2013 \u7b49\u5f85\u8fde\u63a5\u7684\u672c\u5730ip\u5730\u5740<\/li>\n\n\n\n<li><code>listenport<\/code>\u00a0\u2013 \u672c\u5730\u76d1\u542c\u7684TCP\u7aef\u53e3\uff08\u5f85\u8f6c\u53d1\uff09<\/li>\n\n\n\n<li><code>connectaddress<\/code>\u00a0\u2013 \u88ab\u8f6c\u53d1\u7aef\u53e3\u7684\u672c\u5730\u6216\u8005\u8fdc\u7a0b\u4e3b\u673a\u7684ip\u5730\u5740<\/li>\n\n\n\n<li><code>connectport<\/code>\u00a0\u2013 \u88ab\u8f6c\u53d1\u7684\u7aef\u53e3<\/li>\n<\/ol>\n\n\n\n<p>\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u670d\u52a1\u5668\u5185\u7f51IP\u662f<code>172.28.1.76<\/code>\uff0c\u9700\u8981\u5c06<code>27001<\/code>\u7aef\u53e3\u8f6c\u53d1\u5230\u56fd\u5916\u670d\u52a1\u5668<code>10.17.29.1<\/code>\u7684<code>37033<\/code>\u7aef\u53e3\uff0c\u90a3\u4e48\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>1<\/td><td>netsh interface portproxy add v4tov4 listenaddress=<code>172.28.1.76<\/code> listenport=<code>27001<\/code> connectaddress=<code>10.17.29.1<\/code> connectport=<code>37033<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u4e0b\u9762\u7684\u547d\u4ee4\u662f\u7528\u6765\u5c55\u793a\u7cfb\u7edf\u4e2d\u7684\u6240\u6709\u8f6c\u53d1\u89c4\u5219\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>1<\/td><td>netsh interface portproxy show v4tov4<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u5220\u9664\u521a\u624d\u521b\u5efa\u7684\u90a3\u4e2a\u8f6c\u53d1\u7684\u547d\u4ee4\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>1<\/td><td>netsh interface portproxy delete v4tov4 listenaddress=<code>172.28.1.76<\/code> listenport=<code>27001<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u6ce8\u610f\uff1a\u8fde\u63a5\u65f6\u8bf7\u786e\u4fdd\u9632\u706b\u5899\uff08<code>Windows<\/code>\u9632\u706b\u5899\u6216\u8005\u5176\u4ed6\u7684\u7b2c\u4e09\u65b9\u9632\u62a4\u8f6f\u4ef6\uff09\u5141\u8bb8\u5916\u90e8\u8fde\u63a5\u5230\u4e00\u4e2a\u5168\u65b0\u7684\u7aef\u53e3\uff0c\u5982\u679c\u4e0d\u5141\u8bb8\uff0c\u90a3\u4e48\u53ea\u80fd\u81ea\u884c\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684<code>Windows<\/code>\u9632\u706b\u5899\u89c4\u5219\u3002<\/p>\n\n\n\n<p>\u8be5\u547d\u4ee4\u7684\u5e38\u7528\u53c2\u6570\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><code>netstat -ano | find listenport<\/code>\u00a0\u67e5\u770b\u662f\u5426\u542f\u52a8\u6210\u529f<\/li>\n\n\n\n<li><code>netsh interface portproxy show all<\/code>\u00a0\u663e\u793a\u7cfb\u7edf\u4e2d\u7684\u8f6c\u53d1\u89c4\u5219\u5217\u8868<\/li>\n\n\n\n<li><code>netsh interface portproxy dump<\/code>\u00a0\u67e5\u770bportproxy\u8bbe\u7f6e<\/li>\n\n\n\n<li><code>netsh interface portproxy delete v4tov4 listenport=localport listenaddress=localaddress<\/code><\/li>\n\n\n\n<li><code>netsh interface portproxy reset<\/code>\u00a0\u6e05\u9664\u6240\u6709\u7aef\u53e3\u8f6c\u53d1\u89c4\u5219<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u53c2\u8003\u5730\u5740\"><a href=\"https:\/\/kekxv.github.io\/2021\/08\/07\/Port%20forwarding%20that%20comes%20with%20Windows\/#%E5%8F%82%E8%80%83%E5%9C%B0%E5%9D%80\"><\/a>\u53c2\u8003\u5730\u5740<\/h3>\n\n\n\n<p><a href=\"https:\/\/www.williamlong.info\/archives\/5575.html\" rel=\"noreferrer noopener\" target=\"_blank\">\u901a\u8fc7Windows\u5b9e\u73b0\u7aef\u53e3\u8f6c\u53d1<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u8fc7&nbsp;Windows&nbsp;\u5b9e\u73b0\u7aef\u53e3\u8f6c\u53d1\u3002\u672c\u6587\u4e3a\u53c2\u8003\u8f6c\u53d1\u6587\u7ae0 \u4f7f\u7528Portproxy\u6a21\u5f0f\u4e0b\u7684Ne &#8230; <a title=\"Windows\u81ea\u5e26\u7684\u7aef\u53e3\u8f6c\u53d1\" class=\"read-more\" href=\"https:\/\/airy.cn\/WordPress\/?p=1968\" aria-label=\"\u9605\u8bfb Windows\u81ea\u5e26\u7684\u7aef\u53e3\u8f6c\u53d1\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kadence_starter_templates_imported_post":false,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-1968","post","type-post","status-publish","format-standard","hentry","category-airy-tech"],"_links":{"self":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/1968","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1968"}],"version-history":[{"count":1,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/1968\/revisions"}],"predecessor-version":[{"id":1969,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/1968\/revisions\/1969"}],"wp:attachment":[{"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1968"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/airy.cn\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}