id: 76065d8cece944b183c39fb5c53713b0
parent_id: 
item_type: 1
item_id: 5feacbc4c8fc4c76bf64bebd33221f30
item_updated_time: 1764345633293
title_diff: "[{\"diffs\":[[1,\"外网用IPv4访问公司IPv6服务器，V6server就这么简单！\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":33}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>外网用IPv4访问公司IPv6服务器，V6server就这么简单！</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <meta name=\\\"content-class\\\" content=\\\"yinxiang.peso.superNote\\\"/>\\\r\\\n  <meta name=\\\"application-data:yinxiang.noteLayout\\\" content=\\\"{\\\"lineSpace\\\":\\\"recommend\\\",\\\"paragraphSpace\\\":\\\"recommend\\\"}\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"42807\\\"></a>\\\r\\\n<h1>外网用IPv4访问公司IPv6服务器，V6server就这么简单！</h1>\\\r\\\n\\\r\\\n<div><span style=\\\"\\\"><div style=\\\"max-width: 700px;\\\"><p></p><div style=\\\"--en-blockquote: true; box-sizing: border-box; border-left: 3px solid #b4c0cc; background-position: initial initial; background-repeat: initial initial;\\\"><div>原文链接: <a href=\\\"http://mp.weixin.qq.com/s?__biz=Mzg5MTc1MDU5MA==&amp;mid=2247486471&amp;idx=1&amp;sn=3103ed262e77c9eec52c7dedcea7dee7&amp;chksm=ce9ccf308a061364d7385819a1a08d5ea3408a33bb2488d37938625c5dbdf8dba7b6083581a7&amp;mpshare=1&amp;scene=1&amp;srcid=0524ofGWKF1SeBOpjuO0VFUl&amp;sharer_shareinfo=d96bebd03c6ca27146d9ca83cec8e21c&amp;sharer_shareinfo_first=d96bebd03c6ca27146d9ca83cec8e21c#rd\\\"><span>http://mp.weixin.qq.com/s?__biz=Mzg5MTc1MDU5MA==&amp;mid=2247486...</span></a></div></div><p></p><div style=\\\"\\\"><div><div><div><span style=\\\"\\\">原创</span><span> 网络工程师之路 </span><span><a style=\\\"\\\"> 网络工程师之路 </a></span><span><em></em></span></div><div style=\\\"\\\"><p style=\\\"text-indent: 2em;\\\"><span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">在内网</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">ipv6</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">部署完成之后，之前的</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">ipv4</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">服务器成到</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">ipv6</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">地址后，还是想要映射端口到公网方便运维和管理，但是由于服务器地址变成了</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">ipv6</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">地址，</span></span><span lang=\\\"en-US\\\" style=\\\"\\\"></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">所以</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">ipv4</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">的</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">nat</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">条目就不生效了。这时候就需要用到</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">NAT64</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">之中的</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">&quot;v6server&quot;</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">这个特性。</span></span></span></p><div><div style=\\\"width: 100%; display: flex;\\\"><div style=\\\"display: flex;\\\"><div style=\\\"background: linear-gradient(90deg, #E05D4C 0%, #FFE279 22%, #A7FF75 45%, #58EEEA 69%, #39A9F1 100%); border-radius: 19px; z-index: 1;\\\"><div style=\\\"background: #121214; border-radius: 19px; text-align: center; display: flex; height: 38px;\\\"><div style=\\\"text-align: center;\\\"><p style=\\\"font-weight: bold; color: #000;\\\"><span>什么是v6server？</span></p></div><div style=\\\"width: 10px; height: 10px; transform: rotate(45deg); border-top: 1px solid #fff; border-right: 1px solid #fff;\\\"><span><br/></span></div></div></div><div style=\\\"width: 100%; height: 38px; background: linear-gradient(90deg, rgba(224, 93, 76, 0.48) 0%, rgba(255, 226, 121, 0.48) 22%, rgba(167, 255, 117, 0.48) 45%, rgba(88, 238, 234, 0.48) 69%, rgba(57, 169, 241, 0.48) 100%); border-radius: 19px; -webkit-filter: blur(6px); transform: scale(1.02);\\\"><span><br/></span></div></div></div></div><p style=\\\"text-indent: 2em;\\\"><span lang=\\\"en-US\\\"><span style=\\\"\\\">NAT64</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">网关支持</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">IPv4</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">到</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">IPv6</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">的转换，配置静态映射，将特定的</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">IPv4</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">地址映射到</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">IPv6</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">服务器的地址。</span></span></p><p style=\\\"text-indent: 2em;\\\"><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">如果使用使用域名的方式，需要确保</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">DNS</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">解析正确，必要的时候还需要</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">DNS64</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">的配合或者手动设置</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">A</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">记录指向映射的</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">IPv4</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">地址。</span></span></p><div><div style=\\\"width: 100%; display: flex;\\\"><div style=\\\"display: flex;\\\"><div style=\\\"background: linear-gradient(90deg, #E05D4C 0%, #FFE279 22%, #A7FF75 45%, #58EEEA 69%, #39A9F1 100%); border-radius: 19px; z-index: 1;\\\"><div style=\\\"background: #121214; border-radius: 19px; text-align: center; display: flex; height: 38px;\\\"><div style=\\\"text-align: center;\\\"><p style=\\\"font-weight: bold; color: #000;\\\"><span>实验模拟</span></p></div><div style=\\\"width: 10px; height: 10px; transform: rotate(45deg); border-top: 1px solid #fff; border-right: 1px solid #fff;\\\"><span><br/></span></div></div></div><div style=\\\"width: 100%; height: 38px; background: linear-gradient(90deg, rgba(224, 93, 76, 0.48) 0%, rgba(255, 226, 121, 0.48) 22%, rgba(167, 255, 117, 0.48) 45%, rgba(88, 238, 234, 0.48) 69%, rgba(57, 169, 241, 0.48) 100%); border-radius: 19px; -webkit-filter: blur(6px); transform: scale(1.02);\\\"><span><br/></span></div></div></div></div><div><div><div style=\\\"display: flex; width: 100%;\\\"><div style=\\\"display: flex; width: 100%;\\\"><div style=\\\"background: rgb(51, 51, 51); border-width: 1px; border-style: solid; border-color: rgb(51, 51, 51);\\\"><div style=\\\"width: 24px; height: 24px; background: rgb(255, 213, 93); border-width: 1px; border-style: solid; border-color: rgb(51, 51, 51); text-align: center; transform: translate(-3px, -3px); overflow: hidden; white-space: nowrap;\\\"><p style=\\\"font-weight: bold; color: #333;\\\"><span>01</span></p></div></div><div style=\\\"text-align: left;\\\"><p style=\\\"font-weight: bold; color: #000; letter-spacing: 1px;\\\"><span>拓扑图和需求</span></p></div></div></div></div></div><div style=\\\"text-indent: 2em;\\\"><span style=\\\"\\\">R3模拟内网的服务器，开启ssh服务，端口为43200,R1模拟公网IPV4客户端，通过ipv4公网地址222.172.111.2的ssh22端口登录内网ipv6的R2。</span></div><div style=\\\"text-align: center;\\\"><img src=\\\":/b480d830710f4ecc9b1faca1a4217a84\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks: %7B%22align%22%3A%22center%22%7D; height: auto; width: auto;\\\" width=\\\"auto\\\"/></div><div><div><div style=\\\"display: flex; width: 100%;\\\"><div style=\\\"display: flex; width: 100%;\\\"><div style=\\\"background: rgb(51, 51, 51); border-width: 1px; border-style: solid; border-color: rgb(51, 51, 51);\\\"><div style=\\\"width: 24px; height: 24px; background: rgb(255, 213, 93); border-width: 1px; border-style: solid; border-color: rgb(51, 51, 51); text-align: center; transform: translate(-3px, -3px); overflow: hidden; white-space: nowrap;\\\"><p style=\\\"font-weight: bold; color: #333;\\\"><span>02</span></p></div></div><div style=\\\"text-align: left;\\\"><p style=\\\"font-weight: bold; color: #000; letter-spacing: 1px;\\\"><span>关键配置</span></p></div></div></div></div></div><div><div style=\\\"width: 100%;\\\"><div style=\\\"width: 100%; display: flex;\\\"><div style=\\\"width: 100%; background: #2C2C2C;\\\"><div style=\\\"width: 100%; display: flex;\\\"><div style=\\\"width: 100%; height: 1px; border-top: 1px solid #FFFFFF;\\\"><span><br/></span></div><div style=\\\"width: 15px; height: 5px; display: flex;\\\"><img src=\\\":/2d0b90c374b340fb96eb0d4f9fd3bba5\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks: %7B%22align%22%3A%22center%22%7D; height: auto; width: auto;\\\" width=\\\"auto\\\"/></div></div><div style=\\\"width: 100%; text-align: left;\\\"><div><span style=\\\"color: #000; background-color: rgb(44, 44, 44);\\\"><span style=\\\"font-weight: bold;\\\">//配置nat64前缀</span></span></div><div><span style=\\\"color: #000; background-color: rgb(44, 44, 44);\\\">aft prefix-nat64 2010:: 96</span></div><div><span style=\\\"color: #000; background-color: rgb(44, 44, 44);\\\"><span style=\\\"font-weight: bold;\\\">//配置静态映射关系，将222.172.111.2的22端口映射到2010::2的43200端口</span></span></div><div><span style=\\\"color: #000; background-color: rgb(44, 44, 44);\\\">aft v6server protocol tcp 222.172.111.2 22 2001::2 43200</span></div><div><span><br/></span></div><div><span style=\\\"color: #000; background-color: rgb(44, 44, 44);\\\">interface GigabitEthernet0/0</span></div><div><span style=\\\"color: #000; background-color: rgb(44, 44, 44);\\\">ip address 222.172.111.2 255.255.255.0</span></div><div><span style=\\\"color: #000; background-color: rgb(44, 44, 44);\\\">aft enable  <span style=\\\"font-weight: bold;\\\">//外网接口开启AFT</span></span></div><div><span><br/></span></div><div><span style=\\\"color: #000; background-color: rgb(44, 44, 44);\\\">interface GigabitEthernet0/1</span></div><div><span style=\\\"color: #000; background-color: rgb(44, 44, 44);\\\">aft enable  <span style=\\\"font-weight: bold;\\\"></span></span><span style=\\\"color: #000; background-color: rgb(44, 44, 44);\\\"><span style=\\\"font-weight: bold;\\\">//内网接口开启AFT</span></span></div><div><span style=\\\"color: #000; background-color: rgb(44, 44, 44);\\\">ipv6 address 2001::1/64  </span><span style=\\\"color: #000; background-color: rgb(44, 44, 44);\\\"><br/></span></div></div><div style=\\\"width: 100%; display: flex;\\\"><div style=\\\"width: 15px; height: 5px; display: flex; transform: rotateY(180deg);\\\"><img src=\\\":/440a1d5ecdee448aa6f34743c5b33799\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks: %7B%22align%22%3A%22center%22%7D; height: auto; width: auto;\\\" width=\\\"auto\\\"/></div><div style=\\\"width: 100%; height: 1px; border-top: 1px solid #FFFFFF;\\\"><span><br/></span></div></div></div></div></div></div><div><div><div style=\\\"display: flex; width: 100%;\\\"><div style=\\\"display: flex; width: 100%;\\\"><div style=\\\"background: rgb(51, 51, 51); border-width: 1px; border-style: solid; border-color: rgb(51, 51, 51);\\\"><div style=\\\"width: 24px; height: 24px; background: rgb(255, 213, 93); border-width: 1px; border-style: solid; border-color: rgb(51, 51, 51); text-align: center; transform: translate(-3px, -3px); overflow: hidden; white-space: nowrap;\\\"><p style=\\\"font-weight: bold; color: #333;\\\"><span>03</span></p></div></div><div style=\\\"text-align: left;\\\"><p style=\\\"font-weight: bold; color: #000; letter-spacing: 1px;\\\"><span>结果验证</span></p></div></div></div></div></div><div style=\\\"text-indent: 0px;\\\"><span style=\\\"\\\">在R1上测试ssh登录映射后的222.172.111.2地址的22端口，可以看出能登录到R3上面。</span></div><div style=\\\"text-align: center;\\\"><img src=\\\":/fa707d02b39548eea40c36b54b4830ea\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks: %7B%22align%22%3A%22center%22%7D; height: auto; width: auto;\\\" width=\\\"auto\\\"/></div><div style=\\\"text-indent: 0px;\\\"><span style=\\\"\\\">R3设备上的日志信息</span></div><div style=\\\"\\\"><img src=\\\":/8776a4ffccc54d04a5db280e47a3c2f7\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" height=\\\"108\\\" style=\\\"--en-marks: %7B%22align%22%3A%22center%22%7D; height: auto; width: auto;\\\" width=\\\"auto\\\"/></div><div style=\\\"text-indent: 0px;\\\"><span style=\\\"\\\">aft的ipv4和ipv6会话的源目地址转换关系</span></div><div style=\\\"\\\"><img src=\\\":/e105f46857a94aa68d582294a4a4e4ca\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" height=\\\"525\\\" style=\\\"--en-marks: %7B%22align%22%3A%22center%22%7D; height: auto; width: auto;\\\" width=\\\"auto\\\"/></div><div><div style=\\\"width: 100%; display: flex;\\\"><div style=\\\"display: flex;\\\"><div style=\\\"background: linear-gradient(90deg, #E05D4C 0%, #FFE279 22%, #A7FF75 45%, #58EEEA 69%, #39A9F1 100%); border-radius: 19px; z-index: 1;\\\"><div style=\\\"background: #121214; border-radius: 19px; text-align: center; display: flex; height: 38px;\\\"><div style=\\\"text-align: center;\\\"><p style=\\\"font-weight: bold; color: #000;\\\"><span>本文总结</span></p></div><div style=\\\"width: 10px; height: 10px; transform: rotate(45deg); border-top: 1px solid #fff; border-right: 1px solid #fff;\\\"><span><br/></span></div></div></div><div style=\\\"width: 100%; height: 38px; background: linear-gradient(90deg, rgba(224, 93, 76, 0.48) 0%, rgba(255, 226, 121, 0.48) 22%, rgba(167, 255, 117, 0.48) 45%, rgba(88, 238, 234, 0.48) 69%, rgba(57, 169, 241, 0.48) 100%); border-radius: 19px; -webkit-filter: blur(6px); transform: scale(1.02);\\\"><span><br/></span></div></div></div></div><p style=\\\"text-indent: 2em;\\\"><span lang=\\\"en-US\\\"><span style=\\\"\\\">&quot;v6server&quot;</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">在</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">NAT64</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">中通常指代需要暴露给</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">IPv4</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">客户端的</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">IPv6</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">服务器。通过静态地址映射和</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">DNS</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">配置，结合</span></span><span lang=\\\"en-US\\\"><span style=\\\"\\\">NAT64</span></span><span lang=\\\"zh-CN\\\"><span style=\\\"\\\">网关的协议转换能力，可实现双向通信。实际部署时需注意协议兼容性和安全策略。</span></span></p><div><div><div style=\\\"border-style: solid; border-width: 2px;\\\"><div style=\\\"border-style: dashed; border-width: 1px;\\\"><div style=\\\"text-align: center;\\\"><img src=\\\":/b4d11212a8d34261b84a97e3d100aaa0\\\" type=\\\"image/gif\\\" data-filename=\\\"640.gif\\\" style=\\\"--en-marks: %7B%22align%22%3A%22center%22%7D; width: auto; height: auto;\\\" width=\\\"auto\\\"/></div><p style=\\\"text-align: justify; letter-spacing: 1.5px;\\\"><span style=\\\"color: #888888;\\\"><span>●<a href=\\\"https://mp.weixin.qq.com/s?__biz=Mzg5MTc1MDU5MA==&amp;mid=2247486451&amp;idx=1&amp;sn=2dbe64e8955a734cd27caec0816a2cc1&amp;scene=21#wechat_redirect\\\" style=\\\"\\\" target=\\\"_blank\\\">企业IPv6改造完成，外网却卡在IPv4？3步搞定NAT64互通！</a></span></span></p><p style=\\\"text-align: justify; letter-spacing: 1.5px;\\\"><span style=\\\"color: #888888;\\\"><span>●</span></span><span style=\\\"color: #888888;\\\"><span><a href=\\\"https://mp.weixin.qq.com/s?__biz=Mzg5MTc1MDU5MA==&amp;mid=2247486435&amp;idx=1&amp;sn=cc5781eb0cc4a8b4364e7d3e5d4c97af&amp;scene=21#wechat_redirect\\\" style=\\\"\\\" target=\\\"_blank\\\">为什么客户交换机要用子接口替代VLANIF实现高效组网？</a></span></span></p><p style=\\\"\\\"><span style=\\\"color: #888888;\\\"><span>●</span></span><span style=\\\"color: #888888;\\\"><span><a href=\\\"https://mp.weixin.qq.com/s?__biz=Mzg5MTc1MDU5MA==&amp;mid=2247486435&amp;idx=1&amp;sn=cc5781eb0cc4a8b4364e7d3e5d4c97af&amp;scene=21#wechat_redirect\\\" style=\\\"\\\" target=\\\"_blank\\\">为什么客户交换机要用子接口替代VLANIF实现高效组网？</a></span></span></p><p style=\\\"\\\"><span style=\\\"color: #888888;\\\"><span>●<a href=\\\"https://mp.weixin.qq.com/s?__biz=Mzg5MTc1MDU5MA==&amp;mid=2247486424&amp;idx=1&amp;sn=1adced5639d78c1af900f5b505ac1543&amp;scene=21#wechat_redirect\\\" style=\\\"\\\" target=\\\"_blank\\\">光纤到户了，家庭宽带为啥还在使用PPPoE拨号上网？</a></span></span></p></div></div></div></div></div></div></div></div></div></span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":14710}]"
metadata_diff: {"new":{"id":"5feacbc4c8fc4c76bf64bebd33221f30","parent_id":"f67288c3a0be4374b5d532b5dcc3aabc","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764348845596,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T21:04:13.885Z
created_time: 2025-11-28T21:04:13.885Z
type_: 13