{"id":511,"date":"2025-02-06T07:44:36","date_gmt":"2025-02-06T07:44:36","guid":{"rendered":"https:\/\/proxyboys.net\/tech\/nat-network-address-translation\/"},"modified":"2025-02-06T07:44:36","modified_gmt":"2025-02-06T07:44:36","slug":"nat-network-address-translation","status":"publish","type":"post","link":"https:\/\/proxyboys.net\/zh\/tech\/nat-network-address-translation\/","title":{"rendered":"NAT\uff08\u7f51\u7edc\u5730\u5740\u8f6c\u6362\uff09"},"content":{"rendered":"<h3>\u4e86\u89e3 NAT\uff08\u7f51\u7edc\u5730\u5740\u8f6c\u6362\uff09\uff1a\u4ee3\u7406\u7528\u6237\u6307\u5357<\/h3>\n<p>\u554a\uff0c\u7f51\u7edc\u5730\u5740\u8f6c\u6362 (NAT) \u2014 \u73b0\u4ee3\u7f51\u7edc\u7684\u65e0\u540d\u82f1\u96c4\u3002\u5982\u679c\u60a8\u66fe\u7ecf\u4ece\u5bb6\u5ead\u7f51\u7edc\u6d4f\u89c8\u7f51\u9875\u3001\u73a9\u8fc7\u5728\u7ebf\u6e38\u620f\uff0c\u751a\u81f3\u53ea\u662f\u67e5\u770b\u8fc7\u7535\u5b50\u90ae\u4ef6\uff0c\u90a3\u4e48\u60a8\u5c31\u4e0d\u77e5\u4e0d\u89c9\u5730\u4e0e NAT \u5171\u821e\u3002\u5b83\u5c31\u50cf\u9ad8\u7ea7\u4ff1\u4e50\u90e8\u7684\u4fdd\u9556\uff0c\u786e\u4fdd\u53ea\u6709\u5408\u9002\u7684\u5ba2\u4eba\uff08\u6570\u636e\u5305\uff09\u8fdb\u51fa\uff0c\u540c\u65f6\u4fdd\u6301\u6d3e\u5bf9\uff08\u60a8\u7684\u7f51\u7edc\uff09\u987a\u5229\u8fdb\u884c\u3002 <\/p>\n<p>\u8ba9\u6211\u4eec\u6df1\u5165\u4e86\u89e3 NAT \u662f\u4ec0\u4e48\u3001\u5b83\u5982\u4f55\u8fd0\u884c\u4ee5\u53ca\u5b83\u4e3a\u4ec0\u4e48\u5bf9\u4ee3\u7406\u7528\u6237\u81f3\u5173\u91cd\u8981\u3002<\/p>\n<h4>\u4ec0\u4e48\u662f NAT\uff1f<\/h4>\n<p>\u672c\u8d28\u4e0a\uff0cNAT \u662f\u4e00\u79cd\u5c06\u79c1\u6709\uff08\u975e\u5168\u7403\u552f\u4e00\uff09IP \u5730\u5740\u8f6c\u6362\u4e3a\u516c\u5171 IP \u5730\u5740\u6216\u5c06\u516c\u5171 IP \u5730\u5740\u8f6c\u6362\u4e3a\u79c1\u6709 IP \u5730\u5740\u7684\u65b9\u6cd5\u3002\u6b64\u8f6c\u6362\u4f7f\u672c\u5730\u7f51\u7edc\u4e0a\u7684\u591a\u4e2a\u8bbe\u5907\u53ef\u4ee5\u5171\u4eab\u4e00\u4e2a\u516c\u5171 IP \u5730\u5740\u3002\u5b83\u5728\u8282\u7701\u6709\u9650\u7684\u53ef\u7528 IPv4 \u5730\u5740\u6c60\u65b9\u9762\u7279\u522b\u6709\u7528\u3002<\/p>\n<p><strong>NAT\u7684\u4e3b\u8981\u529f\u80fd\uff1a<\/strong><\/p>\n<ol>\n<li><strong>\u89e3\u51b3\u4fdd\u62a4\u95ee\u9898<\/strong>\uff1a\u901a\u8fc7\u5141\u8bb8\u591a\u53f0\u8bbe\u5907\u5171\u4eab\u4e00\u4e2a IP \u5730\u5740\uff0cNAT \u8282\u7701\u4e86\u5168\u5c40 IPv4 \u5730\u5740\u7a7a\u95f4\u3002<\/li>\n<li><strong>\u5b89\u5168<\/strong>\uff1aNAT \u4f5c\u4e3a\u5185\u90e8\u7f51\u7edc\u548c\u4e92\u8054\u7f51\u4e4b\u95f4\u7684\u5c4f\u969c\uff0c\u5411\u5916\u90e8\u7f51\u7edc\u5c4f\u853d\u5185\u90e8 IP \u5730\u5740\u3002<\/li>\n<li><strong>\u8def\u7531<\/strong>\uff1a\u5b83\u4fee\u6539 IP \u6570\u636e\u5305\u7684\u62a5\u5934\u4fe1\u606f\u4ee5\u786e\u4fdd\u5b83\u4eec\u5230\u8fbe\u9884\u5b9a\u7684\u76ee\u7684\u5730\u3002<\/li>\n<\/ol>\n<h4>NAT \u7684\u7c7b\u578b<\/h4>\n<ol>\n<li><strong>\u9759\u6001 NAT<\/strong>\uff1a\u79c1\u6709 IP \u5730\u5740\u4e0e\u516c\u6709 IP \u5730\u5740\u7684\u4e00\u4e00\u6620\u5c04\uff0c\u5e38\u7528\u4e8e\u9700\u8981\u56fa\u5b9a\u516c\u6709 IP \u7684\u670d\u52a1\u5668\u3002<\/li>\n<li><strong>\u52a8\u6001 NAT<\/strong>\uff1a\u5c06\u79c1\u6709 IP \u5730\u5740\u4ece\u516c\u5171\u5730\u5740\u6c60\u6620\u5c04\u5230\u516c\u5171 IP \u5730\u5740\u3002\u6620\u5c04\u53ef\u80fd\u4f1a\u968f\u65f6\u95f4\u800c\u53d8\u5316\u3002<\/li>\n<li><strong>PAT\uff08\u7aef\u53e3\u5730\u5740\u8f6c\u6362\uff09<\/strong>\uff1a\u4e5f\u79f0\u4e3a NAT \u8fc7\u8f7d\uff0c\u5b83\u5141\u8bb8\u672c\u5730\u7f51\u7edc\u4e0a\u7684\u591a\u4e2a\u8bbe\u5907\u4f7f\u7528\u4e0d\u540c\u7684\u7aef\u53e3\u53f7\u6620\u5c04\u5230\u5355\u4e2a\u516c\u5171 IP \u5730\u5740\u3002\u8fd9\u662f\u5bb6\u5ead\u7f51\u7edc\u4e2d\u6700\u5e38\u89c1\u7684\u5f62\u5f0f\u3002<\/li>\n<\/ol>\n<h4>NAT\u7c7b\u578b\u5bf9\u7167\u8868<\/h4>\n<table>\n<thead>\n<tr>\n<th>\u7279\u5f81<\/th>\n<th>\u9759\u6001 NAT<\/th>\n<th>\u52a8\u6001 NAT<\/th>\n<th>PAT\uff08\u7aef\u53e3\u5730\u5740\u8f6c\u6362\uff09<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u6620\u5c04\u7c7b\u578b<\/td>\n<td>\u4e00\u5bf9\u4e00<\/td>\n<td>\u591a\u5bf9\u5c11<\/td>\n<td>\u591a\u5bf9\u4e00<\/td>\n<\/tr>\n<tr>\n<td>IP \u5730\u5740\u6c60<\/td>\n<td>\u56fa\u5b9a\u7684<\/td>\n<td>\u516c\u5171 IP \u6c60\u6709\u9650<\/td>\n<td>\u5177\u6709\u4e0d\u540c\u7aef\u53e3\u7684\u5355\u4e2a\u516c\u5171 IP<\/td>\n<\/tr>\n<tr>\n<td>\u7528\u4f8b<\/td>\n<td>\u6258\u7ba1\u670d\u52a1\u5668\u3001\u670d\u52a1<\/td>\n<td>\u4e0d\u592a\u5e38\u89c1\uff0c\u4f46\u5bf9\u4e8e\u67d0\u4e9b\u5e94\u7528\u5f88\u6709\u7528<\/td>\n<td>\u5bb6\u5ead\u7f51\u7edc\u4e2d\u6700\u5e38\u89c1<\/td>\n<\/tr>\n<tr>\n<td>\u914d\u7f6e<\/td>\n<td>\u624b\u52a8\u7684<\/td>\n<td>\u9700\u8981\u53ef\u7528\u7684\u516c\u5171 IP \u5217\u8868<\/td>\n<td>\u81ea\u52a8 IP \u548c\u7aef\u53e3\u5206\u914d<\/td>\n<\/tr>\n<tr>\n<td>\u5b89\u5168<\/td>\n<td>\u4e2d\u7b49\uff08\u66b4\u9732 IP\uff09<\/td>\n<td>\u4e2d\u7b49\uff08\u66b4\u9732 IP\uff09<\/td>\n<td>\u9ad8\uff08\u5185\u90e8 IP \u88ab\u5c4f\u853d\uff09<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>NAT \u7684\u5de5\u4f5c\u539f\u7406\uff1a\u7ed3\u6784\u5316\u793a\u4f8b<\/h4>\n<p>\u5047\u8bbe\u6709\u4e00\u4e2a\u5c0f\u578b\u529e\u516c\u5ba4\uff0c\u5176\u4e2d\u6709\u4e09\u53f0\u8ba1\u7b97\u673a\uff08PC1\u3001PC2\u3001PC3\uff09\uff0c\u8fde\u63a5\u5230\u5177\u6709\u4e00\u4e2a\u516c\u5171 IP \u5730\u5740\uff08203.0.113.5\uff09\u7684\u8def\u7531\u5668\u3002\u6bcf\u53f0\u8bbe\u5907\u90fd\u6709\u4e00\u4e2a\u79c1\u6709 IP\uff1a<\/p>\n<ul>\n<li>PC1\uff1a192.168.1.2<\/li>\n<li>PC2\uff1a192.168.1.3<\/li>\n<li>PC3\uff1a192.168.1.4<\/li>\n<\/ul>\n<p>\u5f53PC1\u5411\u4e92\u8054\u7f51\u53d1\u9001\u8bf7\u6c42\u65f6\uff0c\u8fc7\u7a0b\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li><strong>\u8981\u6c42<\/strong>\uff1aPC1 \u5411\u8def\u7531\u5668\u53d1\u9001\u4e00\u4e2a\u6570\u636e\u5305\u3002\u8be5\u6570\u636e\u5305\u7684\u6e90 IP \u4e3a 192.168.1.2\u3002<\/li>\n<li><strong>\u7ffb\u8bd1<\/strong>\uff1a\u8def\u7531\u5668\u5c06\u6e90 IP\uff08192.168.1.2\uff09\u66ff\u6362\u4e3a\u5176\u516c\u7f51 IP\uff08203.0.113.5\uff09\uff0c\u5e76\u8bb0\u5f55\u4f7f\u7528\u7684\u7aef\u53e3\u53f7\u3002<\/li>\n<li><strong>\u8f6c\u53d1<\/strong>\uff1a\u6570\u636e\u5305\u88ab\u53d1\u9001\u5230\u4e92\u8054\u7f51\u4e0a\u7684\u76ee\u6807\u670d\u52a1\u5668\u3002<\/li>\n<li><strong>\u56de\u590d<\/strong>\uff1a\u670d\u52a1\u5668\u54cd\u5e94203.0.113.5\u3002<\/li>\n<li><strong>\u53cd\u5411\u7ffb\u8bd1<\/strong>\uff1a\u8def\u7531\u5668\u63a5\u6536\u6570\u636e\u5305\uff0c\u68c0\u67e5\u5176\u8f6c\u6362\u8868\uff0c\u5e76\u5c06\u6570\u636e\u5305\u8f6c\u53d1\u56de PC1\uff08192.168.1.2\uff09\u3002<\/li>\n<\/ol>\n<p>\u6b64\u8fc7\u7a0b\u5141\u8bb8\u591a\u4e2a\u8bbe\u5907\u4ec5\u4f7f\u7528\u4e00\u4e2a\u516c\u5171 IP \u5730\u5740\u901a\u8fc7\u4e92\u8054\u7f51\u8fdb\u884c\u901a\u4fe1\u3002<\/p>\n<h4>\u771f\u5b9e\u7528\u4f8b\uff1a\u4ee3\u7406\u7528\u6237\u7684 NAT<\/h4>\n<p>\u5047\u8bbe\u4e00\u5bb6\u5c0f\u578b\u4f01\u4e1a\u4f7f\u7528\u4ee3\u7406\u670d\u52a1\u5668\u8bbf\u95ee\u4e92\u8054\u7f51\u3002\u4ee3\u7406\u670d\u52a1\u5668\u5145\u5f53\u5ba2\u6237\u7aef\u4ece\u5176\u4ed6\u670d\u52a1\u5668\u83b7\u53d6\u8d44\u6e90\u7684\u8bf7\u6c42\u7684\u4e2d\u4ecb\u3002NAT \u7684\u4f5c\u7528\u5982\u4e0b\uff1a<\/p>\n<p><strong>\u8bbe\u60f3<\/strong>\uff1a\u4e00\u5bb6\u8425\u9500\u516c\u53f8\u4f7f\u7528\u4ee3\u7406\u670d\u52a1\u5668\u6765\u6709\u6548\u7ba1\u7406\u5176\u4e92\u8054\u7f51\u6d41\u91cf\u3002\u8be5\u516c\u53f8\u6709\u51e0\u540d\u5458\u5de5\u5728\u672c\u5730\u7f51\u7edc\u4e2d\u4f7f\u7528\u4e0d\u540c\u7684\u8bbe\u5907\uff08\u7b14\u8bb0\u672c\u7535\u8111\u3001\u53f0\u5f0f\u673a\uff09\u5de5\u4f5c\uff0c\u4ed6\u4eec\u90fd\u9700\u8981\u8bbf\u95ee\u4e92\u8054\u7f51\u3002<\/p>\n<ul>\n<li>\n<p><strong>NAT \u89d2\u8272<\/strong>\uff1a\u529e\u516c\u5ba4\u7f51\u7edc\u914d\u7f6e\u4e86\u4e00\u4e2a\u516c\u5171 IP \u5730\u5740\u3002NAT \u4f7f\u4ee3\u7406\u670d\u52a1\u5668\u80fd\u591f\u5904\u7406\u6765\u81ea\u591a\u4e2a\u5458\u5de5\u7684\u8bf7\u6c42\uff0c\u800c\u4e0d\u4f1a\u66b4\u9732\u4ed6\u4eec\u5404\u81ea\u7684\u79c1\u6709 IP \u5730\u5740\u3002\u8fd9\u4e0d\u4ec5\u4fdd\u62a4\u4e86\u5185\u90e8\u7f51\u7edc\uff0c\u8fd8\u5141\u8bb8\u516c\u53f8\u901a\u8fc7\u4ee3\u7406\u76d1\u63a7\u548c\u63a7\u5236\u4e92\u8054\u7f51\u8bbf\u95ee\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u597d\u5904<\/strong>\uff1a\u8425\u9500\u516c\u53f8\u53d7\u76ca\u4e8e\u5b89\u5168\u6027\u7684\u63d0\u9ad8\uff0c\u56e0\u4e3a\u5916\u90e8\u670d\u52a1\u5668\u53ea\u80fd\u770b\u5230\u4ee3\u7406\u7684\u516c\u5171 IP \u5730\u5740\u3002\u6b64\u5916\uff0cNAT \u6709\u52a9\u4e8e\u4f18\u5316\u5e26\u5bbd\u4f7f\u7528\uff0c\u56e0\u4e3a\u516c\u53f8\u53ef\u4ee5\u5728\u4ee3\u7406\u670d\u52a1\u5668\u4e0a\u5b9e\u73b0\u7f13\u5b58\uff0c\u4ece\u800c\u51cf\u5c11\u91cd\u590d\u4e0b\u8f7d\u76f8\u540c\u8d44\u6e90\u7684\u9700\u8981\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u4ece\u672c\u8d28\u4e0a\u8bb2\uff0cNAT \u662f\u6570\u5b57\u73af\u5883\u4e2d\u4e0d\u53ef\u6216\u7f3a\u7684\u7ec4\u6210\u90e8\u5206\uff0c\u5c24\u5176\u662f\u5bf9\u4e8e\u4ee3\u7406\u7528\u6237\u800c\u8a00\u3002\u5b83\u4e0d\u4ec5\u53ef\u4ee5\u4fdd\u7559\u5b9d\u8d35\u7684 IP \u5730\u5740\uff0c\u8fd8\u53ef\u4ee5\u63d0\u9ad8\u5b89\u5168\u6027\u548c\u7f51\u7edc\u6548\u7387\u3002\u56e0\u6b64\uff0c\u4e0b\u6b21\u6d4f\u89c8\u7f51\u9875\u65f6\uff0c\u8bf7\u8bb0\u4f4f\uff0cNAT \u5728\u5e55\u540e\u4e0d\u77e5\u75b2\u5026\u5730\u5de5\u4f5c\uff0c\u4ee5\u786e\u4fdd\u60a8\u7684\u4fe1\u606f\u5b89\u5168\uff0c\u8fde\u63a5\u987a\u7545 \u2014 \u5c31\u50cf\u9ad8\u7ea7\u4ff1\u4e50\u90e8\u91cc\u8fd0\u8f6c\u826f\u597d\u7684\u673a\u5668\u4e00\u6837\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>Understanding NAT (Network Address Translation): A Proxy User&#8217;s Guide Ah, Network Address Translation (NAT)\u2014the unsung hero of modern networking. If you\u2019ve ever surfed the web from a home network, played an online game, or even just checked your email, you\u2019ve unwittingly danced with NAT. It\u2019s like the bouncer at an exclusive club, ensuring that only [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":512,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[188],"tags":[219,189,246,190,244,247,245,94,118,215],"class_list":["post-511","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech","tag-firewall","tag-internet-protocol","tag-ip-addressing","tag-ipv4","tag-nat","tag-nat-types","tag-network-address-translation","tag-network-management","tag-networking","tag-security"],"acf":[],"_links":{"self":[{"href":"https:\/\/proxyboys.net\/zh\/wp-json\/wp\/v2\/posts\/511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/proxyboys.net\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/proxyboys.net\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/proxyboys.net\/zh\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/proxyboys.net\/zh\/wp-json\/wp\/v2\/comments?post=511"}],"version-history":[{"count":0,"href":"https:\/\/proxyboys.net\/zh\/wp-json\/wp\/v2\/posts\/511\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/proxyboys.net\/zh\/wp-json\/wp\/v2\/media\/512"}],"wp:attachment":[{"href":"https:\/\/proxyboys.net\/zh\/wp-json\/wp\/v2\/media?parent=511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/proxyboys.net\/zh\/wp-json\/wp\/v2\/categories?post=511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/proxyboys.net\/zh\/wp-json\/wp\/v2\/tags?post=511"}],"curies":[{"name":"\u53ef\u6e7f\u6027\u7c89\u5242","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}